Explore topic-wise MCQs in Lion Bridge.

This section includes 6 Mcqs, each offering curated multiple-choice questions to sharpen your Lion Bridge knowledge and support exam preparation. Choose a topic below to get started.

1.

Follow the code snippet and chose the correct statement(s) int x; void f2() { int x = 1 ; // line 1 :: x = 2; // line 2 x = 2; // line 3 }

A. The statement in line 1 throws a compilation error
B. In line 2 , x=2 is assigned to the global x
C. In line 3, x=2 is assigned to the global x and line 2 throws compilation error
D. Both A and B
Answer» C. In line 3, x=2 is assigned to the global x and line 2 throws compilation error
2.

Which of the following are valid cases for switch statement? (i). -200 (ii). 3*5+2 (iii). a*5+2 (iv). 'x

A. (i), (ii), (iii) and (iv)
B. (i), (ii) and (iv)
C. (i) and (iv)
D. (ii) and (iv)
Answer» C. (i) and (iv)
3.

A member function defined within the class definition, rather than simply declared there taken to be an_____________________ member function

A. static
B. inline
C. constant
D. overloaded
Answer» C. constant
4.

Examine the following code: MOV A, #56H MOV R1, #50H MOV 50H, # 45H XCHG A, @R1 What is the result at A, R1?

A. 56H, 45H
B. 45H, 50H
C. 50H, 56H
D. 45H, 56H
Answer» E.
5.

What is the output of the following code? int account=2; void main() { static int account; printf("%d",account);

A. 2
B. Garbage value
C. 0
D. Error
Answer» D. Error
6.

The purpose of watchdog timer is

A. It acts as an external timer that resets the system if the software fails to operate properly
B. It acts as an internal timer that sets the system if the software fails to operate properly
C. It acts as an internal timer that resets the system if the software fails to operate properly
D. Keeps track of the processor speed
Answer» D. Keeps track of the processor speed