Operators


  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?












  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>
    void main()
    {
    int p = -6;
    int s = (p++, ++p);
    printf("%d\n", s);
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    -4


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












  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    7 -7 2 1



  1. What will be the output of the following C code?
    #include <stdio.h>
    void main()
    {
    int n = 5;
    int *ptr = &n;
    int *q = ptr++;
    int r = ptr - q;
    printf("%d", r);
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    1