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.
B. Throw by reference and catch by reference.
True
False
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
break
continue
exit
All of the above
#include
int main()
{
float a=5.2;
if(a==5.2)
printf("Equal");
else if(a<5.2)
printf("Less than");
else
printf("Greater than");
return 0;
}
Less than
Equal
Greater than
None of above
/ + *
* / +
+ / *
* / + -
True
False
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
while (1)
{i++;}
for( ; ; );
while (true)
{false = 1;}
do
{y = x;}
while (x==0);
the return 0; statement
the first statement after the loop
the statement following the continue statement
the next iteration of the loop
True
False
#define sqr(x= x*x)
main()
{
int a = 10, b = 5;
printf("%d, %d", sqr(a+b),sqr(++a));
}
77, 121
225, 121
77< 144
Compilation error
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
True
False
Positive value
Zero
Negative value
None of these
True
False
An Editor
A compiler
An operating system
None of the above
0
NULL
1
none of the above
void main()
{
float a;
int x = 10, y = 3; a = x / y;
printf("%f", a); }
3.999999
Error
3
3.000000
std::bad_creat
std::bad_alloc
std::bad_cast
std::bad_typeid
enumeration
iteration
culmination
pass through
pointers to strings
string to pointer
both
void main()
{
int a = 20;
printf("%d\t%d
", ++a, a);
}
21 21
20 21
21 20
20 20
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
Explicit
Public
Implicit
Private
91
88
90
89
Dennis Ritchie
Ken Thompson
Bill Gates
Peter Norton
True
False