True
False
A. True
True
False
A
B
BCPL
C++
pointers to strings
string to pointer
both
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.
std::vector
std::list
std::map
std::set
True
False
double and chars
floats and doubles
ints and floats
ints and chars
Work same as printf()
prints the error message specified by the compiler
prints the garbage value assigned by the compiler
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
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
?,-
?,:
++<--
none of the above
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
std::bad_creat
std::bad_alloc
std::bad_cast
std::bad_typeid
Storage
Virtual
Friend
Wrapper
True
False
True
False
while (1)
{i++;}
for( ; ; );
while (true)
{false = 1;}
do
{y = x;}
while (x==0);
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
Keywords have some predefine meanings and these meanings can be changed.
Keywords have some unknown meanings and these meanings cannot be changed.
Keywords have some predefine meanings and these meanings cannot be changed.
None of the above
/ + *
* / +
+ / *
* / + -
True
False
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
break
continue
exit
All of the above
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
True
False
True
False