Font size
WorksheetsC/C++ Programming Chapter 2
Total questions: 16
Worksheet time: 9mins
Every C program begins execution at the function
main
void
stdio.h
if
Every function’s body begins with ___ and ends with ___
left brace ({), right brace (})
right brace (}), left brace ({)
semicolon, left brace ({)
printf, right brace (})
Every statement ends with a(n) (a)
The ___ standard library function displays information on the screen.
printf
scanf
if
readline
The ___ Standard Library function is used to obtain data from the keyboard.
if
printf
scanf
main
The conversion specifier ___ is used in a scanf format control string to indicate
that an integer will be input and in a printf format control string to indicate that an
integer will be output.
%x
%t
%m
%d
Function printf always begins printing at the beginning of a new line.
True
False
Comments cause the computer to display the text after // on the screen when the program is executed.
False
True
The escape sequence \n when used in a printf format control string causes the cursor
to position to the beginning of the next line on the screen.
True
False
The remainder operator (%) can be used only with integer operands.
True
False
All variables must be defined before they’re used.
True
False
All variables must be given a type when they’re defined.
True
False
C considers the variables number and NuMbEr to be identical.
True
False
Definitions can appear anywhere in the body of a function.
True
False
The arithmetic operators *, /, %, + and - all have the same level of precedence.
False
True
A program that prints three lines of output must contain three printf statements.
True
False
