wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Level 3 50 MCQs

Total questions: 50

Worksheet time: 25mins

Name
Class
Date
1.

Which symbol is used to end a statement in C?

a)

:

b)

;

c)

.

d)

,

2.

Which function is used to display output in C?

a)

input()

b)

print()

c)

printf()

d)

display()

3.

Which header file is required for printf()?

a)

stdlib.h

b)

conio.h

c)

stdio.h

d)

math.h

4.

Which keyword is used to declare a variable?

a)

var

b)

let

c)

int

d)

declare

5.

What is the correct extension of a C program file?

a)

.cp

b)

.cpp

c)

.c

d)

.txt

6.

Which data type is used to store decimal values?

a)

int

b)

char

c)

float

d)

void

7.

Which operator is used for addition?

a)

*

b)

+

c)

-

d)

/

8.

Which keyword is used to start a program execution?

a)

start()

b)

main()

c)

begin()

d)

run()

9.

Which symbol is used for single-line comments?

a)

/* */

b)

#

c)

//

d)

**

10.

Which symbol is used for multi-line comments?

a)

//

b)

/* */

c)

##

d)

%%

11.

Which data type stores a single character?

a)

int

b)

float

c)

char

d)

double

12.

Which operator is used to get remainder?

a)

/

b)

%

c)

*

d)

+

13.

Which keyword is used to take input from the user?

a)

get()

b)

read()

c)

scanf()

d)

input()

14.

Which format specifier is used for integer?

a)

%f

b)

%d

c)

%c

d)

%s

15.

Which format specifier is used for float?

a)

%d

b)

%c

c)

%f

d)

%s

16.

Which loop executes at least once?

a)

for

b)

while

c)

do-while

d)

if

17.

Which keyword is used for decision making?

a)

loop

b)

switch

c)

if

d)

both b and c

18.

Which operator is used for assignment?

a)

==

b)

=

c)

>=

d)

!=

19.

Which operator checks equality?

a)

=

b)

==

c)

!=

d)
20.

Which keyword is used to define a function?

a)

function

b)

define

c)

void

d)

fun

21.

Which data type does not return any value?

a)

int

b)

char

c)

void

d)

float

22.

Which operator has highest priority?

a)

+

b)

*

c)

=

d)

&&

23.

Which symbol is used for address of a variable?

a)

*

b)

#

c)

&

d)

%

24.

Which symbol is used for pointer declaration?

a)

&

b)

*

c)

->

d)

%

25.

Which function reads a character?

a)

getchar()

b)

gets()

c)

scanf()

d)

read()

26.

Which function prints a character?

a)

putc()

b)

puts()

c)

printf()

d)

printc()

27.

Which statement is used for multiple choices?

a)

if

b)

if-else

c)

switch

d)

for

28.

Which symbol ends a string?

a)

\n

b)

\0

c)

\t

d)

\s

29.

Which data type is used for true/false?

a)

bool

b)

int

c)

char

d)

float

30.

Which operator is used for logical NOT?

a)

!

b)

~

c)

^

d)

#

31.

Which loop condition is checked at the end?

a)

for

b)

while

c)

do-while

d)

if

32.

Which keyword is used to include header files?

a)

import

b)

include

c)

#include

d)

using

33.

Which escape character is used for new line?

a)

\t

b)

\b

c)

\n

d)

\a

34.

Which language is C?

a)

Object-oriented

b)

Scripting

c)

Procedural

d)

Markup

35.

Define structure in c?

a)

group of items with different data types.

b)

group of items with similar data types.

c)

both a and b

d)

none of these

36.

Default sorting order?

a)

Ascending order

b)

descending order

c)

both a or b

d)

none of these

37.

What is the correct way to declare a constant in C?

a)

int const x = 10;

b)

both a and c

c)

constant int x = 10;

d)

const int x = 10;

38.

Which function is used to allocate memory dynamically?

a)

realloc()

b)

all of the above

c)

calloc()

d)

malloc()

39.

Which operator is used to compare two values?

a)

=

b)

both a and c

c)

==

d)

!=

40.

What is the correct way to declare a constant in C?

a)

const int x;

b)

int const x;

c)

both a and b

d)

constant int x;

41.

Which operator is used to compare two values?

a)

!=

b)

===

c)

==

d)

=

42.

What is the purpose of the 'return' statement in a function?

a)

To exit the function

b)

To return a value to the caller

c)

Both a and b

d)

To declare a variable

43.

what will be the result

printf( "%d", printf("Hello, Bro!!"));

a)

error

b)

Hello, Bro!!

c)

Hello, Bro!!Hello, Bro!!

d)

Hello, Bro!!13

44.

What is the purpose of the 'sizeof' operator?

a)

To compare two values

b)

To declare a variable

c)

To allocate memory

d)

To get the size of a variable

45.

which reduce if else statement in c?

a)

? :

b)

else if

c)

==

d)

if

46.

Which function is used to free dynamically allocated memory?

a)

dispose()

b)

dealloc()

c)

delete()

d)

free()

47.

Which keyword is used to declare a variable as constant?

a)

final

b)

const

c)

immutable

d)

static

48.

pick assignment operator.

a)

&&

b)

=

c)

==

d)

||

49.

Which operator is used to perform subtraction?

a)

*

b)

+

c)

/

d)

-

50.

Which operator is used to increment a variable by one?

a)

++

b)

+=

c)

+1

d)

--