wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Programming in C

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

All keywords in C are in ____________

a)

LowerCase letters

b)

UpperCase letters

c)

Numeric letters

d)

Alphanumeric letters

2.

Which is valid C expression?

a)

int my_num = 100,000;

b)

int my_num = 100000;

c)

int my num = 1000;

d)

int $my_num = 10000;

3.

What is an example of iteration in C?

a)

for

b)

while

c)

do-while

d)

all of the mentioned

4.

What is the output of this statement "printf("%d", (a++))"?

a)

The value of (a + 1)

b)

The current value of a

c)

Error message

d)

Garbage

5.

Which of the following is not a valid C variable name?

a)

int number;

b)

float rate;

c)

int variable_count;

d)

int $main;

6.

Which one of the following is a loop construct that will always be executed once?

a)

for

b)

while

c)

switch

d)

do while

7.

What is the output of C Program.?

int main()

{

int a=32;

do

{

printf("%d ", a);

a++;

}

while(a <= 30);

return 0;

}

a)

32

b)

33

c)

30

d)

No Output

8.

What is the way to suddenly come out of or Quit any Loop in C Language.?

a)

continue; statement

b)

break; statement

c)

leave; statement

d)

quit; statement

9.

which is the only function all C programs must contain?

a)

start()

b)

sys()

c)

main()

d)

scanf()

10.

Which of the following is not a correct variable type?

a)

float

b)

real

c)

int

d)

double