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);
A. printf("%d%d", book.price, book.page);
main()
{
xyz: goto abc;
printf("Hello");
abc: printf("World");
goto xyz;
}
Infinite loop
Hello World
World Hello
Compilation error
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
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
delete
concatenate
compare
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
#if
#elseif
#undef
#pragma
True
False
float a =123.56;
char ch ='T' * 'A';
char ch ='T' *20;
3 +a = b;
What will be output if you will compile and execute the following c code?
#include
int main(){
char c=125;
c=c+10;
printf("%d",c);
return 0;
}
135
+INF
-121
-135
abstract
Virtual
Dynamic
Typeid
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
int num[6] = { 2, 4, 12, 5, 45, 5 } ;
int n{} = { 2, 4, 12, 5, 45, 5 } ;
int n{6} = { 2< 4< 12 } ;
int n(6) = { 2, 4, 12, 5, 45, 5 } ;
\a
\b
\m
35
45
55
40
True
False
True
False
enumeration
iteration
culmination
pass through
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
Sequential
Random
Sequential and Random
None of the above
x + y' is a keyword
3 and 20 are constants
3z is a constant
y is a variable and z is a constant
True
False
True
False
float
string
int
wchar_t
a = 5
a += 5
a = b = c
a = b
True
False
void change (char *k)
{
k="Hello";
return;
}
main()
{
char *ch = "World";;
change(ch);
printf("%s", ch);
}
Hello
World
Compilation error
Hello World