NEW
Font size
WorksheetsC Basic
Total questions: 10
Worksheet time: 20mins
What will be the output of the following C code?
#include <stdio.h>
int main()
{
printf("Hello World! %d \n", x);
return 0;
}
Hello World! x;
Hello World! followed by a junk value
Compile time error
Hello World!
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int y = 10000;
int y = 34;
printf("Hello World! %d\n", y);
return 0;
}
Compile time error
Hello World! 34
Hello World! 1000
Hello World! followed by a junk value
What is the size of an int data type?
4 Bytes
2 Bytes
Depends on the system/compiler
Cannot be determined
Which is correct with respect to the size of the data types?
char > int > float
int > char > float
char < int < double
double > char > int
Find an integer.
13.5
13
"13"
None of the above
Number of Keywords present in C Language are .?
32
34
36
40
Each statement in a C program should end with.?
Semicolon ;
Colon :
Period . (dot symbol)
None of the above.
Correct way of commenting a single line is.?
/*printf("Hello C..");
printf("How are you.");
//printf("Hello C..");
printf("How are you.");
/*printf("Hello C..");
printf("How are you.");*/
/printf("Hello C..");/
printf("How are you.");
An Identifier may contain.?
Letters a-z, A-Z in Basic character set. Unicode alphabet characters other languages
Underscore _ symbol
Numbers 0 to 9 Unicode Numbers in other languages
All the above
Find a correct C Keyword below.
go to
breaker
shorter
default
