Operators


  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    int n = 12;
    int m = n / -5;
    int p = n % -5;
    printf("%d %d\n", m, p);
    return 0;
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    -2 2


  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    int n = -5;
    int m = n % 2;
    printf("%d\n", m);
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    -1