You are on page 1of 2

1.

When you run the following program and


input these data
what will be value of the variable b?
1 3
2 13
2. Which one of the following is not a valid
identifier in C++?

Myage 2!"!#M$%&
m'()% *%Cnum
3. +f you want to write a program to calculate the
area of a circle. ,ow do + declare the variable -(rea.?

int (rea float (rea
char (rea bool (rea
/. What is the output of the following program?

0 3 1 11 0 3
0 3
0 3
1 11
0 3
1 1
0. 2he value of the C++ e3pression
10 + 100 % 3 is4

12 15
13 11
6. 7ollowing C++ statement
cout<< (3<<2) << endl;
will display .............. on the screen.

12 3 2
32 28
8. What will be screen output when you e3ecute
the following program?
1 2 3 1
12
123
1
2
3
1
1 2
1 2 3
1. +f value of a is e9ual to 45: what will be screen
output?
(
$C
"
(
$
C
(
"
$C
"
;. ,ow many mista<es are there in the
following program?
=include >iastream?
using namespace std
+nt main@A
B
int a:bC
aD2C
bD3.2C
int cDa+bC
cout >> c >> endlC
system@EpauseEAC
return 5C
F
1 3
2 /
Answer Section
1. (!*4 $
2. (!*4 C
3. (!*4 C
/. (!*4 $
0. (!*4 "
6. (!*4 (
8. (!*4 "
1. (!*4 $
;. (!*4 "

You might also like