When new operator cannot allocate memory
When alloc function fails
When type requested for new operation is considered bad< thisexception is thrown
When delete operator cannot delete teh allocated (corrupted) object
D. When delete operator cannot delete teh allocated (corrupted) object
True
False
main()
{
int a = 5, b = 6;
(a == b? printf("%d", a));
}
0
5
Error
None of the above
#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
True
False
void main()
{
int a = 20;
printf("%d\t%d
", ++a, a);
}
21 21
20 21
21 20
20 20
#if
#elseif
#undef
#pragma
True
False
x + y' is a keyword
3 and 20 are constants
3z is a constant
y is a variable and z is a constant
The smallest individual units of c program
The basic element recognized by the compiler
The largest individual units of program
A & B Both
An array is a collection of variables that are of the dissimilar data type.
An array is a collection of variables that are of the same data type.
An array is not a collection of variables that are of the same data type.
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
91
88
90
89
True
False
True
False
void main()
{
int a;
int &b = a;
a=100;
printf("b=%d\ta=%d
", b,a);
}
b=100 a=100
b=100 a=0
b=0 a=100
Error
void main()
{
int a = 1, b=2;
int *ip;
ip=&a;
b=*ip;
printf("%d", b);
}
2
1
100
0
#include
int main(){
int i=320;
char *ptr=(char *)&i;
printf("%d",*ptr);
return 0;
}
1
64
320
Compiler Error
Throw by value and catch by reference.
Throw by reference and catch by reference.
Throw by value and catch by value
Throw the pointer value and provide catch for teh pointer type.
24
2
26
None
True
False
abstract
Virtual
Dynamic
Typeid
True
False
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
True
False
True
False
True
False
Simple Template Library
Standard Template Library
Static Type Library
Single Type-based Library
enumeration
iteration
culmination
pass through
4
7
6
0