wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

FINAL ROUND

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

Find the output in following code

int main ()

{

int a,b ;

a= b= 4 ;

b =a++;

Printf ( " %d %d %d %d", a++, --b, ++a, b--);

}

a)

5 3 73

b)

5 4 5 3

c)

6 2 6 4

d)

Syntax Error

2.

C is a ____________ programming language

a)

Object oriented Programming

b)

Procedure oriented Programming

c)

Structured programming language

d)

Structure and Procedure Oriented Programming

3.

_______________to be included to use standard I/O functions : prinf(),scanf()

a)

#include<conio.h>

b)

#include<stdio.h>

c)

#include<string.h>

d)

#include<math.h>

4.

All statements should be written in lower case letters. Upper case letters are only used for symbolic constants.

a)

True

b)

False

5.

Blank spaces can be used while declaring a variable, keyword, constant and function.

a)

True

b)

False

6.

Constants are classified as____________

a)

Literal constants

b)

Qualified constants

c)

Symbolic constants

d)

All

7.

A variable is an entity whose value ____________ during the execution of a program

a)

can change

b)

cannot change

8.

Find Error/ output in following code

int main ()

{

int x= 0, y= 0;

if ( x > 0)

if ( y >0)

printf ("True");

else

printf ("False");

}

a)

No output

b)

True

c)

False

d)

Error because of dangling else problem

9.

int x = 10;


int main()

{

int x = 0;

printf("%d",x);

return 0;

}

a)

10

b)

0

c)

compile error

d)

undefined

10.

what is the Output:

void main()

{

int a=3,b=6;

if(a>b)

printf("%d",a);

else

printf("%d",b);

}

a)

3

b)

6

c)

Compilation Error

d)

Run Time Error