Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

C-I__ quiz

Total questions: 12

Worksheet time: 5mins

Name
Class
Date
1.

Operator % in C Language is called.?

a)

Percentage Operator

b)

Quotient Operator

c)

Modulus

d)

Division

2.

#include <stdio.h>

int main()

{

int a=10, b;

b=a%3;

printf("%d",b);

return 0;

}

a)

0

b)

2

c)

4

d)

1

3.

The size of character variable in c

a)

2 byte

b)

5 byte

c)

8 byte

d)

1 byte

4.

#include <stdio.h>

int main(){

int x= 5*9/3+9;

printf("%d",x);

return 0;

}

a)

8

b)

24

c)

25

d)

None

5.

#include <stdio.h>

int main(){

int x= 5%2 *3/2;

printf("%d",x);

return 0;

}

a)

1

b)

2

c)

3

d)

99

6.

int main()

{

float c = 3.5 + 4.5;

printf("%f", c);

return 0;

}

a)

7

b)

8

c)

9

d)

8.000000

7.

Which data type is used to store whole numbers in C?

a)

char

b)

double

c)

int

d)

float

8.

What is the purpose of the printf function in C?

a)

To read user input

b)

To print text on the screen

c)

To declare variables

d)

To create loops

9.

Which of the following is not a valid C keyword?

a)
print
b)
for
c)
output
d)
int
10.

Who is often referred to as the creator of the C programming language?

a)
Bill Gates
b)
Linus Torvalds
c)
Dennis Ritchie
d)
Alan Turing
11.

In C, what symbol is used for a single-line comment?

a)
//
b)
--
c)
#
d)
/*
12.

When was the C programming language first created?

a)
1972
b)
1995
c)
1980
d)
1965