Programming MCQS - QUESTION DETAILS

What is the output of printf("%d", ~5);?
A. -6
B. 5
C. 6
D. -5

~5 results in the bitwise complement, which is -6.

Similar Questions

What is the purpose of the 'fgets' function in C?






What does the 'sizeof' operator return for a pointer variable?






What is the role of the 'strcpy' function in C?






How do you include a header file in C?






What is the purpose of the 'continue' statement in a loop?






How do you close a file in C?






Which operator is used to access the value pointed to by a pointer in C?






What is the output of printf("%c", 'A' + 1);?






How do you declare a pointer in C?






What is the role of the 'static' keyword in C?