Positive value
Zero
Negative value
None of these
C. Negative value
True
False
Storage
Virtual
Friend
Wrapper
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
printf("%d%d", book.price, book.page);
printf("%d%d", price.book, page.book);
printf("%d%d"< price::book< page::book);
printf("%d%d", price>book, page>book);
True
False
main()
{
xyz: goto abc;
printf("Hello");
abc: printf("World");
goto xyz;
}
Infinite loop
Hello World
World Hello
Compilation error
24
2
26
None
the increment should always be ++k
the variable must always be the letter i when using a for loop
there should be a semicolon at the end of the statement
the commas should be semicolons
True
False
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
double and chars
floats and doubles
ints and floats
ints and chars
An alphabet
A number
A special symbol other than underscore
both (b) and (c)
Type definitions (typedefs)
Class definitions
Function definitions
Template definitions
They begin with a hash symbol
They are processed by a preprocessor
They form an integral part of the code
They have to end with a semi colon
void main()
{
int a = 1, b=2;
int *ip;
ip=&a;
b=*ip;
printf("%d", b);
}
2
1
100
0
the logical operator && cannot be used in a test condition
the while loop is an exit-condition loop
the test condition is always true
the test condition is always false
91
88
90
89
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
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
True
False
Simple Template Library
Standard Template Library
Static Type Library
Single Type-based Library
True
False
True
False
a = 5
a += 5
a = b = c
a = b
abstract
Virtual
Dynamic
Typeid
True
False
3
4
5
infinite
void main()
{
float a;
int x = 10, y = 3; a = x / y;
printf("%f", a); }
3.999999
Error
3
3.000000