wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Basics of Programming with C

Total questions: 17

Worksheet time: 8mins

Name
Class
Date
1.

The minimum number of temporary variables needed to swap the contents of two variables is

a)

1

b)

2

c)

3

d)

0

2.

Choose all the correct statements in reference to the programming language C

a)

General purpose programming language

b)

Middle level programming language

c)

Structured programming language

d)

Object oriented programming language

3.

Array is a collection of

(a)  

4.

What is token in C programming?

4 lines
5.

Library function pow() belongs to which header file?

a)

mathio.h

b)

math.h

c)

square.h

d)

stdio.h

6.

Libray function getch() belongs to which header file?

a)

stdio.h

b)

conio.h

c)

stdlib.h

d)

stdlibio.h

7.

Who developed the C programming language?

a)

Bjarne Stroustrup

b)

James Gosling

c)

Dennis Ritchie

d)

Ray Boyce

8.

A name having a few letters, numbers and special character _(underscore) is called

a)

keywords

b)

reserved keywords

c)

tokens

d)

identifiers

9.

What will be the output of the C code?

a)

Hello World! x;

b)

Hello World! followed by a junk value

c)

Compile time error

d)

Hello World!

10.

Is it possible to run program without main() function?

a)

yes

b)

no

c)

-

d)

-

11.

Which of the following is not a correct variable type?

a)

float

b)

real

c)

int

d)

char

12.
What punctuation is used to indicate the beginning and end of code blocks?
a)
{ }
b)
-> <-
c)
BEGIN and END
d)
( and )
13.

Every C Program Statement must be terminated with a

a)

.

b)

#

c)

;

d)

!

14.

Evaluate(to true or false) each of the following expressions:

(1) 14 <= 14

(2) 14 < 14

a)

false false

b)

true true

c)

true false

d)

false true

15.

Which of the following is the boolean operator for logical-AND?

a)

&

b)

&&

c)

|

d)

||

16.

Identify this sound

4 lines
17.

Did you find this quiz helpful?

a)

Yes

b)

No