A number
A special symbol other than underscore
Both of the above
An alphabet
N=m=0
Value+=10
mySize=x<y?9:11
Value=+=10
What will be the output of the following program?
int main() { int x=5; printf(“%d %d %d”,x,x<<2,x>>2); }
1 20 5
5 1 20
5 20 1
20 1 5
char > int > float
int > char > float
char < int < double
double > char > int
4
5
6
Undefined
2 bytes
4 bytes
8 bytes
1 byte
Bjarne Stroustrup
James A. Gosling
Dennis Ritchie
Dr. E.F. Codd
infomax
info_max
info max
All of these
void
endl
float
switch
-5
1
0
+5
What is the output of this statement
printf("%d", (a++));
The value of (a + 1)
Error message
Garbage
The current value of a
Addition, Division, Modulus
Addition, Modulus, Division
Multiplication, Substration, Modulus
Modulus, Multiplication, Substration
1return
return1
return
$return_1
double
long double
far double
start()
printf()
main()
getch()
LowerCase letters
UpperCase letters
CamelCase letters
None of these
What will be the output of the following code segment?
int x = 24, y = 39, z = 45;z = x + y;y = z - y;x = z - y;printf("\n%d %d %d", x, y, z);
24 39 63
39 24 63
24 39 45
39 24 45
When the following piece of code is executed, what happens?
b = 3;a = b++;
a contains 3 and b contains 4
a contains 4 and b contains 4
a contains 4 and b contains 3
a contains 3 and b contains 3
&
&&
||
!
To determine which operator evaluated first from left to right.
To determine the level of an operator in a program.
To determine how an expression involving more than one operator is evaluated.
To check the expression is valid or not.
scanf()
getche()
gets()
A
B
ADA
C++
| |
All of the above
30
32
36
40
2
Depends on the system
printf("\n");
echo '\n';
printf('\n');
printf('\\n')
What will be output if you compile and execute the following ‘C’ code?
void main(){int i=4,x;x=++i + ++i + ++i;printf("%d",x);}
21
18
19
Compilation error
results in a syntax error
output Infomax7
outputs garbage
outputs infomax and terminates abruptly
<
=
>=
<=
final
constant
const
static
char
int
float_int, keyword, A1
ANSI, ascii, cpu
valid, variable, name
None of the above
Compiler
Interpreter
Assembler
None of These
-1
link, load, code, compile and execute
code, compile, link, execute and load
code, compile, link, load and execute
compile, code, link, load and execute
An Editor
A compiler
An operating system
AT & Ts Bell Laboratories of USA in 1972
AT & Ts Bell Laboratories of USA in 1970
Sun Microsystems in 1973
Cambridge University in 1972
*
%
#
world
addition23
test-name
factorial
It is used to define global variables
It is used to define a macro
It is used to include standard or user-defined header files in the program
It is used to include comments in the code
Spaces
Digits
Underscores
Letters
Assignment Relational Arithmetic
Arithmetic Relational Assignment
Relational Arithmetic Assignment
Assignment Arithmetic Relational
print()
input()
getchar()
cin.get()
Binary operator
Unary operator
Ternary operator
Find the output of following code :
int main() { int i=-2; printf (“-i=%d”,-i); return b; }
–i=2
i=-2
–i=-2
–i=+2
+
++
What is the output of the following code:
int x = 5;
printf("%d", x++);
“programming Trick”
“programming"
‘programming'
$ programming $