wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

C module 1 second quiz

Total questions: 25

Worksheet time: 8mins

Name
Class
Date
1.

............ is a preprocessor directive in C

a)

$

b)

@

c)

#

d)

%

2.

Comments can be included in C program by ...........

a)

//

b)

##

c)

**

d)

>>

3.

A constant in C can be defined using ................

a)

#define

b)

#include

c)

%define

d)

%include

4.

Mode specifier for int datatype is ........

a)

%d

b)

%c

c)

%f

d)

%s

5.

…….. is a preprocessor directive in C

a)

$

b)

#

c)

%

d)

@

6.

Symbol of assignment operator?

a)

=

b)

==

c)

!=

d)

#=

7.

Symbol of equal to operator in C

a)

==

b)

!=

c)

=

d)

>

8.

output function in C is ........................

a)

printf()

b)

scanf()

c)

main()

d)

clrscr()

9.

Input function in C is ...................

a)

printf()

b)

scanf()

c)

main()

d)

clrscr()

10.

symbol of conditional operator?

a)

@?

b)

?:

c)

?;

d)

?<

11.

int a,b;

In this statement, how many variables are declared?

a)

1

b)

2

c)

3

d)

4

12.

12xyz is a valid variable in C.True or false

a)

True

b)

False

13.

int is a valid variable in C. True or false

a)

True

b)

False

14.

_xyz is a valid variable in C. True or false

a)

True

b)

False

15.

float a,b;

In the above statement , float is ..........

a)

datatype

b)

variable

c)

memory

d)

operator

16.

..................... is a named memory location

a)

keyword

b)

token

c)

variable

d)

operator

17.

The code used to create a variable of character type

a)

int a;

b)

float a;

c)

char a;

18.

i=4;

printf("%d",++i);

what is the output?

a)

3

b)

4

c)

5

d)

6

19.

i=4;

printf("%d",i++);

what is the output?

a)

3

b)

4

c)

5

d)

6

20.

i++ is

a)

pre increment operator

b)

post increment operator

21.

--i is .......

a)

Pre decrement operator

b)

Post decrement operator

22.

#include<stdio.h>

#include<conio.h>

void main()

{

int s,a,b;

a=4;

b=5;

s=a+b;

printf("s is %d",s);

getch();

}

What is the output

a)

s=5

b)

s=9

c)

s is 5

d)

s is 9

23.

Syntax of using conditional operator

a)

variable=(condition):True ans?False ans;

b)

variable=(condition)?False ans: True ans;

c)

variable=(condition)?True ans: False ans;

24.

Process of casting one type in to another type

a)

Type casting

b)

Type screening

c)

Type modification

25.

Type qualifiers is also called .......

a)

Type cast

b)

Type operator

c)

Type modifiers