Operators


  1. What will be the final value of x in the following C code?
    #include <stdio.h>
    void main()
    {
    int num = 11 * 6 / 5 + 23;
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    36


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











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    -4



  1. What will be the output of the following C code?
    #include <stdio.h>
    void main()
    {
    int num = 7.5 % 3;
    printf("Value of x is %d", num);
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    Compilation Error


  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