1.Identify the token pasting operator?
a)+
b)++
c)#
d)##
ANSWER: D
2.What is the value of CAR in the following Statement?
enum vehicle
{BUS, SCOOTER = 2, CAR, TRAIN = 5, AEROPLANE = 6}
a)0
b)1
c)3
d)4
ANSWER: C
3.Given the following declaration identify the Correct definition.
typedef struct node
{
int id;
char name[20];
};
a)node n;
b)NODE n;
c)typedef NODE n;
d)typedef node n;
ANSWER: B
What happens When Interrupt Occurs
Difference Between Process and Thread
Difference Between RS232 and RS485 Communication Protocol
Differences between Mutex And Semaphore
4.Identify the correct statement
1.The typedef defines synonym for an Existing data type.
2.The typedef create a new data type that is not existing in C.
3.The typedef helps in easier modification of a portable program.
4.The typedef gives meaningful name to a data type.
a)Option 1, 3 and 4.
b)Option 1 and 4
c)Option 2 and 3
d)Option 2, 3 and 4
ANSWER: A
5.What is the Output of the following code?
enum control
{
On, off, neutral
};
PRINTF(“%d”, off);
a)Compilation error
b)Execution error
c)5
d)1
ANSWER: A
6.What is the output of the following program?
#define MAX (x, y) ((x) > (y) ? (x) : (y))
main()
{
int x=5, y = 5;
printf(“maximum is %d”, MAX( ++x, ++y));
}
a)Maximum is 7
b)Maximum is 5
c)Maximum is 6
d)None
ANSWER: A
CONTINUE READING » a)+
b)++
c)#
d)##
ANSWER: D
2.What is the value of CAR in the following Statement?
enum vehicle
{BUS, SCOOTER = 2, CAR, TRAIN = 5, AEROPLANE = 6}
a)0
b)1
c)3
d)4
ANSWER: C
3.Given the following declaration identify the Correct definition.
typedef struct node
{
int id;
char name[20];
};
a)node n;
b)NODE n;
c)typedef NODE n;
d)typedef node n;
ANSWER: B
More Readings
What happens When Interrupt Occurs
Difference Between Process and Thread
Difference Between RS232 and RS485 Communication Protocol
Differences between Mutex And Semaphore
4.Identify the correct statement
1.The typedef defines synonym for an Existing data type.
2.The typedef create a new data type that is not existing in C.
3.The typedef helps in easier modification of a portable program.
4.The typedef gives meaningful name to a data type.
a)Option 1, 3 and 4.
b)Option 1 and 4
c)Option 2 and 3
d)Option 2, 3 and 4
ANSWER: A
5.What is the Output of the following code?
enum control
{
On, off, neutral
};
PRINTF(“%d”, off);
a)Compilation error
b)Execution error
c)5
d)1
ANSWER: A
6.What is the output of the following program?
#define MAX (x, y) ((x) > (y) ? (x) : (y))
main()
{
int x=5, y = 5;
printf(“maximum is %d”, MAX( ++x, ++y));
}
a)Maximum is 7
b)Maximum is 5
c)Maximum is 6
d)None
ANSWER: A