main()
{
void msg()
{
printf("HELLO WORLD");
}
}
HELLO WORLD
Error
None of the above
Null
True
False
string.h
strings.h
text.h
strcmp.h
#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
delete
concatenate
compare
none of the above
True
False
True
False
91
88
90
89
An array is a collection of variables that are of the dissimilar data type.
An array is a collection of variables that are of the same data type.
An array is not a collection of variables that are of the same data type.
None of the above.
Positive value
Zero
Negative value
None of these
#include
int main(){
int i=320;
char *ptr=(char *)&i;
printf("%d",*ptr);
return 0;
}
1
64
320
Compiler Error
True
False
void main()
{
int z, a = 5, b = 3; z = a * 2 + 26 % 3;
printf("%d", z); }
10
0
12
None of the above
True
False
?,-
?,:
++<--
none of the above
3
4
5
infinite
True
False
Storage
Virtual
Friend
Wrapper
High Level and Procedural
Low Level and OOPS
Middle Level and Procedural
Machine Level and OOPS
int ~Country()
void Country()
int ~Country(Country obj)
void ~Country()
True
False
1 byte
4 bytes
8 bytes
16 bytes
void main()
{
int a;
int &b = a;
a=100;
printf("b=%d\ta=%d
", b,a);
}
b=100 a=100
b=100 a=0
b=0 a=100
Error
True
False
True
False
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
main()
{
int a = 0;
for (; i = 0; i++)
printf("%d", a);
}
0
Nothing will be displayed
Infinite loop
None of the above
Sequential
Random
Sequential and Random
None of the above
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
True
False