main()
{
int k, num = 30;
k = (num > 5 ? (num <= 10 ? 100 : 200) : 500);
printf("
%d", num);
}
200
500
30
Unpredictable
C. 30
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
float
string
int
wchar_t
The smallest individual units of c program
The basic element recognized by the compiler
The largest individual units of program
A & B Both
True
False
double and chars
floats and doubles
ints and floats
ints and chars
std::bad_creat
std::bad_alloc
std::bad_cast
std::bad_typeid
for
while
do-while
while & do-while
True
False
True
False
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
Work same as printf()
prints the error message specified by the compiler
prints the garbage value assigned by the compiler
None of the above
Only once
At least once
More than Once
Any one of the above
**, * or /, + or -
**, *, /, +, -
**< /< *< +<-
/ or *, - or +
void main()
{
float a;
int x = 10, y = 3; a = x / y;
printf("%f", a); }
3.999999
Error
3
3.000000
void main()
{
int z, a = 5, b = 3; z = a * 2 + 26 % 3;
printf("%d", z); }
10
0
12
None of the above
A
B
BCPL
C++
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
abstract
Virtual
Dynamic
Typeid
the return 0; statement
the first statement after the loop
the statement following the continue statement
the next iteration of the loop
True
False
const X* const
X* const
X*
X&
void main()
{
int a = 1, b=2;
int *ip;
ip=&a;
b=*ip;
printf("%d", b);
}
2
1
100
0
#if
#elseif
#undef
#pragma
string.h
strings.h
text.h
strcmp.h
void main()
{
char a = 'B';
switch (a)
{
case 'A' : printf("a");
case 'B' : printf("b");
default : printf("c");
}
B
b
bca
bc
True
False