Sail E0 Webinar

MCQs

Total Questions : 73 | Page 8 of 8 pages
Question 71. What is the output of this C code?    int main()    {        int c = 2 ^ 3;        printf("%d\n", c);    }
  1.    1
  2.    8
  3.    9
  4.    0
 Discuss Question
Answer: Option A. -> 1


None.


Question 72.

What is the output of this C code?    int main()    {        if (7 & 8)        printf("Honesty");            if ((~7 & 0x000f) == 8)                printf("is the best policy\n");    }

  1.    Honesty is the best policy
  2.    Honesty
  3.    is the best policy
  4.    No output
 Discuss Question
Answer: Option C. -> is the best policy


None.


Question 73. What is the output of this C code?    int main()    {        unsigned int a = 10;        a = ~a;        printf("%d\n", a);    }
  1.    -9
  2.    -10
  3.    -11
  4.    10
 Discuss Question
Answer: Option C. -> -11


None.


Latest Videos

Latest Test Papers