CapGemini Pseudo Code set 3
| 1. |
What will be the output of following code :
|
| A. | 2 |
| B. | Bye |
| C. | Runtime Error |
| D. | Hai |
| 2. |
What will be the output of following code :
|
| A. | inside if block |
| B. | inside else block |
| C. | Null Pointer Exception |
| D. | None of these |
| 3. |
What will be the output of following code :
|
| A. | Integer 65 |
| B. | Char 65 |
| C. | Bye |
| D. | Error : Duplicate Values |
| 4. |
What will be the output of following code :
|
| A. | case 1 executed |
| B. | case 2 executed |
| C. | Default block executed |
| D. | Error : Switch statements can not hold |
| 5. |
What will be the output of following code :
|
| A. | case 1 executed |
| B. | case 2 executed |
| C. | default block executed |
| D. | Error : i is not usable |
| 6. |
What will be the output of following code :
|
| A. | Loop Loop Loop Loop Loop |
| B. | Infinite loop |
| C. | 5Loop 5Loop 5Loop 5Loop 5Loop |
| D. | None of these |
| 7. |
What will be the output of following code :
|
| A. | Loop |
| B. | Null |
| C. | 0 |
| D. | Error : Null can not be compared |
| 8. |
What will be the output of following code :
|
| A. | LoopLoopLoopLoopLoop |
| B. | Loop |
| C. | No output |
| D. | None of these |
| 9. |
What will be the output of following code :
|
| A. | Hai |
| B. | HaiHai |
| C. | Infinite loop |
| D. | None of these |
| 10. |
What will be the output of following code :
|
| A. | awesome |
| B. | Error |
| C. | Infinite loop |
| D. | None of these |
| 11. |
What can you say about following line of code:
|
| A. |
It is declaring variable i |
| B. |
It is defining variable i |
| C. |
It will throw error |
| D. |
It's a function. |
Join the community of 1 Lakh+ Developers
Create a free account and get access to tutorials, jobs, hackathons, developer events and neatly written articles.
Create a free account