float
string
int
wchar_t
True
False
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);
3.4e38 to 3.4e38
32767 to 32768
32768 to 32767
32668 to 32667
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
double and chars
floats and doubles
ints and floats
ints and chars
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
Dennis Ritchie
Ken Thompson
Bill Gates
Peter Norton
#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
for
while
do-while
while & do-while
True
False
enumeration
iteration
culmination
pass through
True
False
True
False
main()
{
void msg()
{
printf("HELLO WORLD");
}
}
HELLO WORLD
Error
None of the above
Null
Simple Template Library
Standard Template Library
Static Type Library
Single Type-based Library
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
True
False
\a
\b
\m
True
False
True
False
True
False
4
2
8
10
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
x + y' is a keyword
3 and 20 are constants
3z is a constant
y is a variable and z is a constant
main()
{
int a = 0;
for (; i = 0; i++)
printf("%d", a);
}
0
Nothing will be displayed
Infinite loop
None of the above