wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

C Quizz Day 1

Total questions: 25

Worksheet time: 28mins

Name
Class
Date
1.

All keywords in C are in ____________

a)

Lowercase

b)

Uppercase

c)

Camelcase

d)

None of these

2.

A translator which reads an entire program written in a high level language and converts it into machine language code is:

a)

Assembler

b)

Compiler

c)

Linker

d)

Loader

3.

Which is valid C variable declarations?

a)

int my_num = 100,000;

b)

int my_num = 100000;

c)

int my num = 1000;

d)

int $my_num = 10000;

4.

Which is variable declaration?

a)

int a,b;

b)

c=a+b;

c)

printf("%d%d",a,b)

d)

scanf("%d%d",&a,&b);

5.

how to print a and b variable of int and float respectively

a)

scanf("%d%f",&a,&b);

b)

printf("%d%f",a,b);

c)

printf("%f%d",&a,&b);

d)

printf("%f%d",&a,&b);

6.

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

a)

int a3;

b)

int 3a;

c)

int _A3;

d)

int a_3

7.

What will be the output of the C code?

a)

Hello World! x;

b)

Hello World! followed by a junk value

c)

Compile time error

d)

Hello World!

8.

What will be the output of the following C code?

a)

hello 5

b)

Error

c)

Nothing

d)

Junk value

9.

How many number of bytes used for float Data type?

a)

8

b)

4

c)

16

d)

32

10.

Which specifier is suitable for character data type?

a)

%c

b)

%d

c)

%f

d)

%e

11.

How many number of Keywords available in C Programming?

a)

32

b)

45

c)

55

d)

56

12.

format specifier of int

a)

%i

b)

%c

c)

%d

d)

%b

13.

syntax of printf() in C

a)

printf("%format specifier",&variable);

b)

printf("%format specifier",variable);

c)

'printf(%format specifier,"variable");

d)

printf("%format specifier,&variable");

14.

Which is output function in C

a)

int

b)

%d

c)

scanf()

d)

printf()

15.

What will happen when the following code is executed?

void main()

{

printf("MIET");

main();

}

a)

Wrong statement

b)

It will keep on printing MIET

c)

It will print MIET once

d)

None of these

16.

What is the result after execution of the following code if a is 10, b is 5, and c is 10?

if ((a > b) && (a <= c))

a = a + 1;

else

c = c+1;

a)

a = 10, c = 10

b)

a = 11, c = 10

c)

a = 10, c = 11

d)

a = 11, c = 11

17.

What will the result of 'num' variable after execution of the following statements?

int num = 58;

num % = 11;

a)

3

b)

5

c)

8

d)

11

18.

#include<stdio.h>

int main()

{

int a=4,b,c;

b = --a;

c = a--;

printf("%d %d %d",a,b,c);

return 0;

}

a)

3 3 2

b)

2 3 2

c)

3 2 2

d)

2 3 3

19.

What will the result of len variable after execution of the following statements?

int len;

char str1[] = {"39 march road"};

len = strlen(str1);

a)

11

b)

12

c)

13

d)

14

20.

C is _______ type of programming language ?

a)

Object Oriented

b)

Procedural

c)

Bit level language

d)

Functional

21.

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

a)

for

b)

while

c)

switch

d)

do while

22.

What is the result after execution of the following code if a is 10, b is 5, and c is 10?

if ((a > b) && (a <= c))

a = a + 1;

else

c = c+1;

a)

a = 10, c = 10

b)

a = 11, c = 10

c)

a = 10, c = 11

d)

a = 11, c = 11

23.

Which operator connects the structure name to its member name?

a)

-

b)

=

c)

.

d)

>>

24.

The starting point of C execution at

a)

==

b)

main()

c)

function()

d)

!=

25.

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