Operators


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











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    -2


  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    int n = -7;
    if (!0 == 1)
    printf("Yes\n");
    else
    printf("No\n");
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    Yes



  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    if (~2 == 3)
    {
    printf("Yes\n");
    }
    else
    {
    printf("No\n");
    }
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: E

    No


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

    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: E

    p is 4



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











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    28