wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

KVN naik Quizz 1

Total questions: 20

Worksheet time: 7mins

Name
Class
Date
1.

Who developed the C programming language?

a)

James Gosling

b)
Linus Torvalds
c)

Dennis Ritchie

d)
Bjarne Stroustrup
2.

Which symbol is used to end a statement in C?

a)
;
b)
:
c)
!
d)
.
3.

What is the correct file extension for a C program?

a)
.c
b)
.py
c)
.java
d)
.cpp
4.

Which function is the entry point of a C program?

a)
start
b)
execute
c)
run
d)
main
5.

Which header file is required for printf()?

a)

stdlib.h

b)

stdio.h

c)

math.h

d)

conio.h

6.

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

a)

To print output

b)

To exit the program

c)

To return a value to the caller

d)

To declare a variable

7.

What is the size of an 'int' data type in C on most systems?

a)

2 bytes

b)

8 bytes

c)

1 byte

d)

4 bytes

8.

Which data type is used to store a single character?

a)
string
b)
int
c)
char
d)
float
9.

Which keyword is used to declare a constant in C?

a)
static
b)
const
c)
final
d)
immutable
10.

Which operator is used for logical AND?

a)
||
b)
and
c)
&&
d)
&
11.

What is the index of the first element in an array?

a)
2
b)
1
c)
0
d)
-1
12.

Which loop executes at least once?

a)
for loop
b)
while loop
c)
foreach loop
d)
do-while loop
13.

Which operator is used to get the address of a variable?

a)
*
b)
@
c)
&
d)
%
14.

Which function is used to allocate memory dynamically?

a)
free
b)
realloc
c)
calloc
d)
malloc
15.

Which keyword is used to exit from a loop?

a)
exit
b)
return
c)
continue
d)
break
16.

What is the return type of main() function?

a)
float
b)
int
c)
void
d)
string
17.

Which symbol is used for single-line comments?

a)
//
b)
/* comment */
c)
# comment
d)
// comment
18.
  • Which data type has the largest size?

a)
short
b)
long double
c)
int
d)
float
19.

Which keyword is used to define a structure?

a)
class
b)
struct
c)
define
d)
object
20.

Which operator is used to access the value pointed by a pointer?

a)
*
b)
&
c)
%
d)
@