Question 151
[Q.51] In C language, what will be the output of printf("%d", 077);?
Detailed Solution
077 is an octal constant. 7*$8^1 + 7*8^0$ = 56 + 7 = 63.
[Q.51] In C language, what will be the output of printf("%d", 077);?
077 is an octal constant. 7*$8^1 + 7*8^0$ = 56 + 7 = 63.
[Q.52] What is the value of a after executing int a = 5; a = a++ + ++a; in C?
Modifying a variable twice between sequence points causes undefined behavior in C.
[Q.53] Which storage class in C preserves a local variable's value across multiple function calls?
static local variables retain state between function calls.
[Q.54] In C++, runtime polymorphism (dynamic binding) is achieved using:
Virtual functions enable dynamic method dispatch at runtime.
[Q.55] In Java, what is the default size of an int primitive data type?
Java primitive int is always 32-bit signed integer.