the question mark should be an equal sign
the first semicolon should be a colon
there are too many variables in the statement
the conditional operator is only used with apstrings
D. the conditional operator is only used with apstrings
True
False
24
2
26
None
#define sqr(x= x*x)
main()
{
int a = 10, b = 5;
printf("%d, %d", sqr(a+b),sqr(++a));
}
77, 121
225, 121
77< 144
Compilation error
const X* const
X* const
X*
X&
delete
concatenate
compare
none of the above
High Level and Procedural
Low Level and OOPS
Middle Level and Procedural
Machine Level and OOPS
.
?
;
none of the above
the return 0; statement
the first statement after the loop
the statement following the continue statement
the next iteration of the loop
True
False
True
False
True
False
An Editor
A compiler
An operating system
None of the above
void main()
{
char a = 'B';
switch (a)
{
case 'A' : printf("a");
case 'B' : printf("b");
default : printf("c");
}
B
b
bca
bc
a = 5
a += 5
a = b = c
a = b
True
False
A
B
BCPL
C++
35
45
55
40
abstract
Virtual
Dynamic
Typeid
True
False
int x=40;
main(){
int x=20;
printf("
%d",x);
}
40
20
Compilation Error
Garbeg Value
main()
{
int k, num = 30;
k = (num > 5 ? (num <= 10 ? 100 : 200) : 500);
printf("
%d", num);
}
200
500
30
Unpredictable
Type definitions (typedefs)
Class definitions
Function definitions
Template definitions
4
2
8
10
?,-
?,:
++<--
none of the above
True
False
0
NULL
1
none of the above
True
False
#include
int main()
{
float a=5.2;
if(a==5.2)
printf("Equal");
else if(a<5.2)
printf("Less than");
else
printf("Greater than");
return 0;
}
Less than
Equal
Greater than
None of above
True
False
void main()
{
float a;
int x = 10, y = 3; a = x / y;
printf("%f", a); }
3.999999
Error
3
3.000000