×
Login Or SignUp
Privacy Policy
Terms Of Service
freetests4u.com
Online Knowledge Sharing Platform
Login/SignUp
freetests4u.com
Blogs
Mock Tests
Videos
Jobs
26 .
When stacks are created
A.
Are initially empty
B.
Are initialized to zero
C.
Are initialized to one
D.
Are considered full
E.
None of these
View Answer
Ans: Are initially empty
27 .
The code :
int i = 7;
printf("%d ", i++ * i++);
A.
prints 49
B.
prints 56
C.
is compiler dependent
D.
expression i++ * i++ is undefined
E.
None of the above
View Answer
Ans: prints 56
28 .
What will be output if you will execute following C code ?
#include<`stdio.h`> (Please neglect `` this signs)
int main()
{
char arr[20]="MysticRiver";
printf("%d",sizeof(arr));
return 0;
}
A.
10
B.
11
C.
20
D.
21
E.
31
View Answer
Ans: 20
29 .
Consider the following program :
main ( )
{ float a = 0.5, b = 0.7;
if (b < 0.8)
if (a < 0.5)
printf ("ABCD");
else printf ("PQR");
else printf ("JKLF");
}
The output is:
A.
ABCD
B.
PQR
C.
JKLF
D.
Error
E.
None of these
View Answer
Ans: PQR
30 .
What will be output if you will compile and execute the following C code ?
#include<`stdio.h`> (Please neglect `` this signs)
int main()
{
int x;
for(x=1;x<=5;x++);
printf("%d",x); return 0;
}
A.
4
B.
5
C.
6
D.
Compiler error
E.
None of the above
View Answer
Ans: 6
1
2
3
4
5
6
7
8
9
10
11
12