×
Login Or SignUp
Privacy Policy
Terms Of Service
freetests4u.com
Online Knowledge Sharing Platform
Login/SignUp
freetests4u.com
Blogs
Mock Tests
Videos
Jobs
46 .
Each C preprocessor directive begins with
A.
#
B.
include
C.
main()
D.
{
E.
}
View Answer
Ans: #
47 .
When is linear queue said to be empty ?
A.
Front==rear
B.
Front=rear
C.
Front=rear-1
D.
Front=rear+1
E.
None of these
View Answer
Ans: Front=rear
48 .
The output of this program is :
int a = 10;
void main()
{
int a = 20;
cout << a << ::a;
}
A.
10 20
B.
20 10
C.
20 20
D.
Syntax error
E.
None of these
View Answer
Ans: 20 10
49 .
What will be output if you will compile and execute the following c code ?
struct marks
{
int p:3;
int c:3;
int m:2;
};
void main()
{
struct marks s={2,-6,5};
printf("%d %d %d",s.p,s.c,s.m);
}
A.
2 2 1
B.
2 -6 1
C.
2 -6 5
D.
Compiler error
E.
None of these
View Answer
Ans: 2 2 1
50 .
What is the output of the following code ?
void main()
{
int a=0;
int b=0;
++a == 0 || ++b == 11;
printf(" %d,%d",a,b);
}
A.
0, 1
B.
1, 0
C.
0, 0
D.
1, 1
E.
Error
View Answer
Ans: 1, 1
1
2
3
4
5
6
7
8
9
10
11
12