Font size
WorksheetsDay -1
Total questions: 15
Worksheet time: 11mins
Which of the following scanf statement is used to scan maximum of 4 characters from the console?
scanf("%4c",str);
scanf("%4s",str);
scanf("%4c",&str);
scanf("%4s",&str);
Prints nothing
Hello
Run time error
Compilation Error
____________________ is used to print a character.
%str
%ch
%c
%s
5
24
120
1
What will be printed while executing the following statement?
printf("12+23");
12
23
35
12+23
Which of the following will be the correct code to print character 'A'?
None of the listed options
True
False
Error
Invalid Syntax
Which among the following is odd one out?
scanf()
getchar()
fscanf()
printf()
Find the value of the variable 'm'.
m = ++i + ++j * ++k; where, i=8, j=7, k=3.
29
33
30
41
lesser
equal greater lesser
equal
none of the listed options
a%2<1
a%2==1
a%2==0
a%2>1
TRUE
compile time error
Undefined Behaviour
FALSE
None of the listed options
3
4
5
1
10
20
30
Hello World! x;
Hello World! followed by a garbage value
Compile time error
Hello World!
