const X* const
X* const
X*
X&
D. X&
True
False
True
False
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.
pointers to strings
string to pointer
both
void change (char *k)
{
k="Hello";
return;
}
main()
{
char *ch = "World";;
change(ch);
printf("%s", ch);
}
Hello
World
Compilation error
Hello World
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
main()
{
int a = 5, b = 6;
(a == b? printf("%d", a));
}
0
5
Error
None of the above
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
?,-
?,:
++<--
none of the above
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.
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
for
while
do-while
while & do-while
True
False
True
False
True
False
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
void main()
{
int a = 0;
while (a<=50) for(;;) if(++a % 50==0) break;
printf("a = %d", a);
}
a = 100
a = 50
compilation error
runtime error
True
False
Storage
Virtual
Friend
Wrapper
main()
{
int a = 0;
for (; i = 0; i++)
printf("%d", a);
}
0
Nothing will be displayed
Infinite loop
None of the above
break
continue
exit
All 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
An Editor
A compiler
An operating system
None of the above
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
True
False
True
False