std::bad_creat
std::bad_alloc
std::bad_cast
std::bad_typeid
A. std::bad_creat
True
False
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.
True
False
True
False
main()
{
int sub[50];
for(i=0; i<=48;i++)
{
sub[i]=i;
printf("
%d", sub[i]);
}
}
0 to 48 will be displayed
48
49
Compilation Error
Simple Template Library
Standard Template Library
Static Type Library
Single Type-based Library
to go to the next iteration in a loop
come out of a loop
exit and return to the main function
restarts iterations from beginning of loop
True
False
void main()
{
static int a = 1, b, c;
if (a>=2) b=2; c=3;
printf("%d\t%d", b,c);
}
2 3
0 3
0 0
2 0
True
False
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
0
NULL
1
none of the above
main()
{
void msg()
{
printf("HELLO WORLD");
}
}
HELLO WORLD
Error
None of the above
Null
True
False
float a =123.56;
char ch ='T' * 'A';
char ch ='T' *20;
3 +a = b;
True
False
**, * or /, + or -
**, *, /, +, -
**< /< *< +<-
/ or *, - or +
?,-
?,:
++<--
none of the above
int x=40;
main(){
int x=20;
printf("
%d",x);
}
40
20
Compilation Error
Garbeg Value
delete
concatenate
compare
none of the above
main()
{
int k, num = 30;
k = (num > 5 ? (num <= 10 ? 100 : 200) : 500);
printf("
%d", num);
}
200
500
30
Unpredictable
int f(int a, int b);
void main()
{
int a = 12, b=154;
printf("%d", f(a, b));
}
int f(int a, int b)
{
if (a<b) return(f(b, a));
if(b==0) return(a);
return (f(b, a % b));
}
2
1
Compilation error
Runtime error
Storage
Virtual
Friend
Wrapper
string.h
strings.h
text.h
strcmp.h
main()
{
int a = 0;
for (; i = 0; i++)
printf("%d", a);
}
0
Nothing will be displayed
Infinite loop
None of the above
The smallest individual units of c program
The basic element recognized by the compiler
The largest individual units of program
A & B Both
An Editor
A compiler
An operating system
None of the above
void main()
{
int a = 20;
printf("%d\t%d
", ++a, a);
}
21 21
20 21
21 20
20 20
a = 5
a += 5
a = b = c
a = b