main()
{
int a = 0;
for (; i = 0; i++)
printf("%d", a);
}
0
Nothing will be displayed
Infinite loop
None of the above
D. None of the above
True
False
What will be output if you will compile and execute the following c code?
#include
#define x 5+2
int main(){
int i;
i=x*x*x;
printf("%d",i);
return 0;
}
27
343
233
Compiler Error
std::vector
std::list
std::map
std::set
0
NULL
1
none of the above
int ~Country()
void Country()
int ~Country(Country obj)
void ~Country()
True
False
True
False
Overloading is a dynamic or run-time binding and Overriding is static or compile-time binding
Redefining a function in a friend class is called function overriding while Redefining a function in a derived class is called a overloaded fucntion.
Overloading is a static or compile-time binding and Overriding is dynamic or run-time binding
Redefining a function in a friend class is called function overloading while Redefining a function in a derived class is called as overridden fucnion.
True
False
True
False
True
False
True
False
break
continue
exit
All of the above
253
254
255
256
Positive value
Zero
Negative value
None of these
True
False
True
False
main()
{
void msg()
{
printf("HELLO WORLD");
}
}
HELLO WORLD
Error
None of the above
Null
An alphabet
A number
A special symbol other than underscore
both (b) and (c)
Work same as printf()
prints the error message specified by the compiler
prints the garbage value assigned by the compiler
None of the above
True
False
True
False
#if
#elseif
#undef
#pragma
4
7
6
0
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
#include
int main(){
int i=320;
char *ptr=(char *)&i;
printf("%d",*ptr);
return 0;
}
1
64
320
Compiler Error
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
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