C Fundamentals - Study Mode
[#141] Find the output of the following program. void main()
{
int i=065, j=65
printf("%d %d", i, j)
}
Correct Answer
(A) 53 65
Explanation
Solution: As octal 65 ( 065 ) is equivalent of decimal value 53.
[#142] If ASCII value of 'x' is 120, then what is the value of the H, if H = ('x' – 'w' ) / 3
Correct Answer
1
Explanation
Solution: Because 'x'-'w' = 120-119. And hence 1/3 results in 0(integer division)
[#143] What will be the output of the following C code? #include <stdio.h>
void main()
{
int k = 0
double b = k++ + ++k + k--
printf("%d", k)
}
Correct Answer
(B) 1
[#144] What will be the output of the following C code? #include <stdio.h>
void main()
{
int k = 8
int m = 7
k < m ? k = k + 1 : m = m + 1
printf("%d", k)
}
Correct Answer
(A) Compile time error
[#145] Which of the following is not a valid variable name declaration?
Correct Answer
(C) int 3_a
(H) None of the mentioned
(L) #define PI 3.14