wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Quiz 1

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

int a = 10, b = 20;

cout << "Number is a + b" << '\n';


a)

Number is a + b

b)

“Number is a + b”


c)

Number is 30


d)

Number is a + b = 30


2.

int x = 3.3 , y = 7;

cout << x + y << '\n';


a)

x + y


b)

10

c)

10.3

d)

x + 7

3.

float x = 3.000;

String s = "3.000";

cout << x <<" "<< s << '\n';


a)

3.000  3.000

b)

3  3.000

c)

syntax error

d)

3.000 3

4.

string num="12.0",num1="34.5"; 

cout<< num + num1 <<'\n';

a)

46.5


b)

46

c)

syntax error

d)

12.034.5

5.

cout<<"X\nY";

a)

 X\nY


b)

XY

c)

X   

Y

d)

X

6.

int a=2 , b=6 , c=1 ;

a += 2;

b += 1;

c += 4;

cout<<a<<" "<<b<<" "<<c<<'\n';

a)

2 6 1


b)

 7 5 4


c)

5 7 4


d)

4 7 5

7.

char c = 'a'  ;

cout<< c++ <<'\n';

cout<< ++c <<'\n';


a)

b

 c


b)

a

b

c)

a

c

d)

c

a

8.

int x = 23  ;

cout<<  x%10  <<'\n';


a)

0

b)

2.3

c)

2

d)

3

9.

int x = 23  ;

cout<< (x%10) + (x/10) <<'\n';


a)

5

b)

4

c)

6

d)

3

10.

string s = "33"  ;

Int x = 3 ;


cout<< x + s <<'\n';


a)

3

b)

33

c)

syntax error

d)

333