Work same as printf()
prints the error message specified by the compiler
prints the garbage value assigned by the compiler
None of the above
B. prints the error message specified by the compiler
void main()
{
int a = 20;
printf("%d\t%d
", ++a, a);
}
21 21
20 21
21 20
20 20
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
float
string
int
wchar_t
#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
24
2
26
None
True
False
putchar(65)
putchar('x')
putchar("x")
')
True
False
253
254
255
256
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
4
7
6
0
int ~Country()
void Country()
int ~Country(Country obj)
void ~Country()
0
NULL
1
none of the above
3
4
5
infinite
Sequential
Random
Sequential and Random
None of the above
**, * or /, + or -
**, *, /, +, -
**< /< *< +<-
/ or *, - or +
Explicit
Public
Implicit
Private
High Level and Procedural
Low Level and OOPS
Middle Level and Procedural
Machine Level and OOPS
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
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
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.
Storage
Virtual
Friend
Wrapper
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
void main()
{
int a = 1, b=2;
int *ip;
ip=&a;
b=*ip;
printf("%d", b);
}
2
1
100
0