COMPUTER GAYN
include
printf function
main function
scanf function
ANS:- C
Q2.Which of following is not a keyword in C?
break
static
continue
function
ANS:- d
Q3.Which of the following are derived data types in C?
1. int
2. array
3. pointer
4. float
1,3,4
2, 3
1, 4
2,4
Q4.What is the output of the below program?
#include <stdio.h> int main() { int i = 0; switch (i) { case '0': printf("Geeks"); break; case '1': printf("Quiz"); break; default: printf("GeeksQuiz"); } return 0; } |
GeeksQuiz
Quiz
Compile-time error
Geeks
Switch
While
for
do.. while
ANS:-a
Q6.Which of the following statement is correct for switch controlling expression?
“switch” control expression can be empty as well
Both int and char can be used in “switch” control expression
Only int can be used in “switch” control expression
All types i.e. int, char and float can be used in “switch” control expression
1. | ++ |
2. | << |
3. | - - |
4. | && |
1, 2
1, 3
1,2,3
2,4
- main()
- {
- int i = 2;
- {
- int i = 4, j = 5;
- printf("%d %d", i, j);
- }
- printf("%d %d", i, j);
- }
2525
4525
4545
None of the these
ANS:-b
Q9.What is the output of this statement "printf("%d", (a++))"?
Error message
The current value of a
Garbage
The value of (a + 1)
ANS:-b
0 Comments