Operators


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











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    -5


  1. What will be the output of the following C code?












  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    6



  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    if (7 & 8)
    printf("All");
    if ((~7 & 0x000f) == 8)
    printf("that glitters is not gold.\n");
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    that glitters is not gold


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











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    20



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











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    4