wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Basics in C Programming

Total questions: 21

Worksheet time: 15mins

Name
Class
Date
1.
Name (Lastname, Firstname, MI) (Ex. DE LA CRUZ, JUAN, E.)
4 lines
2.
A standard C function that displays formatted string to the standard output device.
a)
printf
b)
gets
c)
scanf
d)
return
3.
A standard C function that accepts input from the standard input device.
a)
printf
b)
scanf
c)
for
d)
return
4.
A C header file to "include" when using the printf function.
a)
stdio.h
b)
conio.h
c)
string.h
d)
math.h
5.
A C header file to "include" when using the scanf function.
a)
stdio.h
b)
conio.h
c)
string.h
d)
math.h
6.
Required to be placed at the end of a C statement.
a)
Semicolon
b)
Period
c)
Comma
d)
None of the other choices
7.
Format specifier for characters.
a)
%c
b)
%d
c)
%f
d)
%s
8.
Format specifier for integers.
a)
%c
b)
%d
c)
%f
d)
%s
9.
Format specifier for floating point values.
a)
%c
b)
%d
c)
%f
d)
%s
10.
Format specifier for strings.
a)
%c
b)
%d
c)
%f
d)
%s
11.
Character/s used to enclose string literals.
a)
double quotes - " "
b)
single quotes - ' '
c)
square brackets - [ ]
d)
angular brackets - < >
12.
Allows you to declare constants in C.
a)
const
b)
float
c)
int
d)
return
13.
An arithemetic operator in C that returns the sum of two values.
a)
+
b)
-
c)
/
d)
*
14.
An arithemetic operator in C that returns the remainder instead of the quotient of two integers.
a)
%
b)
-
c)
/
d)
*
15.
Which is NOT an assignment operator?
a)
+=
b)
==
c)
=
d)
*=
16.
Which is NOT a loop construct in C?
a)
for
b)
while
c)
do..while
d)
switch
17.
A value in C that can be used to represent FALSE boolean value.
a)
Zero
b)
Any letter
c)
A string
d)
An operator
18.
A C function used to accept strings in C.
a)
gets
b)
printf
c)
scanf
d)
for
19.
A C header file to be "included" when using the gets function.
a)
stdio.h
b)
conio.h
c)
string.h
d)
math.h
20.
The operator for bitwise AND.
a)
&
b)
&&
c)
|
d)
^
21.
Characters used to enclose blocks of code in C.
a)
< >
b)
[ ]
c)
/* */
d)
{ }