Font size
WorksheetsICT8 Coding Quiz Bee
Total questions: 25
Worksheet time: 14mins
What is the purpose of #include <stdio.h> in a C program?
What does the printf() function do in C?
int (a) () printf{ ("Hello World!"); return 0; }
What does the return 0; statement do in the main() function?
It prints the value 0 to the screen
It defines the start of the program
It ends the main() function
It adds a new line in the output
C ignores white space, such as blank lines and extra spaces.
TRUE
FALSE
In C, each code statement must end with a semicolon (;).
TRUE
FALSE
What is the output of the following code? printf("Hello World!")
printf
Error
Statements are executed, one by one, in the same order as they are written.
True
False
You cannot use more than one printf() functions in your program.
True
False
What does the \n character do in a C program?
What will the following code output?
printf("Hello World!\nI am learning C.");
Hello World! I am learning in C.
How can you create a blank line between two printed lines in C?
Use printf("Line 1\n Line 2");
What is the meaning of comments in C?
Which data type is used to store integers (whole numbers) in C?
What is the correct syntax to declare a variable of type int with the value 15?
Create a variable named weight and assign the value 45.23 to it.
(a)
Why won't the following code run?
int myNum = 15;
printf(myNum);
What format specifier is used to print an integer value in C?
%c
%f
What will the following code output?
int myNum = 15;
printf("%d", myNum);
myNum
%d
An error
Which format specifier is used to print a multiple characters in C?
%c
%d
%i
%s
How would you print a float variable with 4 decimal places in C?
printf("4%f", floatVariable);
What will the following code output?
int x = 5;
int y = 6;
int sum = x + y;
printf("%d", sum);
5
6
Who developed C language?
Which symbol represents a PROCESS in a flowchart?
If a student wants to check “Is the score greater than 75?”, which symbol should be used?
