MCQOPTIONS
Saved Bookmarks
This section includes 33 Mcqs, each offering curated multiple-choice questions to sharpen your Ericsson knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Which is the right way to declare constant in C? |
| A. | int constant var =10; |
| B. | int const var = 10; |
| C. | const int var = 10; |
| D. | B & C Both |
| Answer» E. | |
| 2. |
In switch statement, each case instance value must be _______? |
| A. | Constant |
| B. | Variable |
| C. | Special Symbol |
| D. | None of the avobe |
| Answer» B. Variable | |
| 3. |
What is the work of break keyword? |
| A. | Halt execution of program |
| B. | Restart execution of program |
| C. | Exit from loop or switch statement |
| D. | None of the avobe |
| Answer» D. None of the avobe | |
| 4. |
What is function? |
| A. | Function is a block of statements that perform some specific task. |
| B. | Function is the fundamental modular unit. A function is usually designed to perform a specific task. |
| C. | Function is a block of code that performs a specific task. It has a name and it is reusable |
| D. | All the above |
| Answer» E. | |
| 5. |
Which one of the following sentences is true ? |
| A. | The body of a while loop is executed at least once. |
| B. | The body of a do ... while loop is executed at least once. |
| C. | The body of a do ... while loop is executed zero or more times. |
| D. | A for loop can never be used in place of a while loop. |
| Answer» C. The body of a do ... while loop is executed zero or more times. | |
| 6. |
A binary tree with 27 nodes has _______ null branches. |
| A. | 54 |
| B. | 27 |
| C. | 26 |
| D. | None of the above |
| Answer» E. | |
| 7. |
Which one of the following is not a linear data structure? |
| A. | Array |
| B. | Binary Tree |
| C. | Queue |
| D. | Stack |
| Answer» C. Queue | |
| 8. |
Recursive functions are executed in a? |
| A. | First In First Out Order |
| B. | Load Balancing |
| C. | Parallel Fashion |
| D. | Last In First Out Order |
| Answer» E. | |
| 9. |
Queue is a _____________ list. |
| A. | LIFO |
| B. | LILO |
| C. | FILO |
| D. | FIFO |
| Answer» E. | |
| 10. |
The statement print f ("%d", 10 ? 0 ? 5 : 1 : 12); will print? |
| A. | 10 |
| B. | 0 |
| C. | 12 |
| D. | 1 |
| Answer» E. | |
| 11. |
To represent hierarchical relationship between elements, which data structure is suitable? |
| A. | Priority |
| B. | Tree |
| C. | Dqueue |
| D. | All of the above |
| Answer» C. Dqueue | |
| 12. |
The _______ memory allocation function modifies the previous allocated space. |
| A. | calloc |
| B. | free |
| C. | malloc |
| D. | realloc |
| Answer» E. | |
| 13. |
Number of binary trees formed with 5 nodes are |
| A. | 30 |
| B. | 36 |
| C. | 108 |
| D. | 42 |
| Answer» E. | |
| 14. |
The worst case time complexity of AVL tree is better in comparison to binary search tree for |
| A. | Search and Insert Operations |
| B. | Search and Delete Operations |
| C. | Insert and Delete Operations |
| D. | Search, Insert and Delete Operations |
| Answer» E. | |
| 15. |
C is ______ Language? |
| A. | Low Level |
| B. | High Level |
| C. | Assembly Level |
| D. | Machine Level |
| Answer» C. Assembly Level | |
| 16. |
The Default Parameter Passing Mechanism is called as |
| A. | Call by Value |
| B. | Call by Reference |
| C. | Call by Address |
| D. | Call by Name |
| Answer» B. Call by Reference | |
| 17. |
What is Dequeue? |
| A. | Elements can be added from front |
| B. | Elements can be added to or removed from either the front or rear |
| C. | Elements can be added from rear |
| D. | None of the above |
| Answer» C. Elements can be added from rear | |
| 18. |
In which linked list last node address is null? |
| A. | Doubly linked list |
| B. | Circular list |
| C. | Singly linked list |
| D. | None of the above |
| Answer» D. None of the above | |
| 19. |
Which is the correct syntax to declare constant pointer?a |
| A. | int *const constPtr; |
| B. | *int constant constPtr; |
| C. | const int *constPtr; |
| D. | A and C both |
| Answer» E. | |
| 20. |
Every C Program must have one function called?a |
| A. | switch() |
| B. | main() |
| C. | struct() |
| D. | for() |
| Answer» C. struct() | |
| 21. |
The keywords are also called |
| A. | Safe words |
| B. | Static words |
| C. | Reserved words |
| D. | Reused words |
| Answer» D. Reused words | |
| 22. |
Which of the following is correct set of keywords? |
| A. | unsigned, external, typedef, signed |
| B. | unsigned, volatile, typedef, every |
| C. | unsigned, volatile, typedef, sizeof |
| D. | None of the above |
| Answer» D. None of the above | |
| 23. |
What is %f, %d, %s and %c? |
| A. | Number Specifier |
| B. | Format Specifier |
| C. | Access Specifier |
| D. | None of the above |
| Answer» C. Access Specifier | |
| 24. |
What will be the output of 5.0 / 2? |
| A. | 2 |
| B. | 3 |
| C. | 0 |
| D. | 2.5 |
| Answer» E. | |
| 25. |
Which of the following is a Compound assignment operators? |
| A. | += |
| B. | *= |
| C. | /= |
| D. | All the above |
| Answer» E. | |
| 26. |
The largest element of an array index is called its |
| A. | Lower bound |
| B. | Upper bound |
| C. | Range |
| D. | All of the above |
| Answer» C. Range | |
| 27. |
Which of the following search algorithm requires a sorted array? |
| A. | Linear search |
| B. | Hash search |
| C. | Binary search |
| D. | All of these |
| Answer» D. All of these | |
| 28. |
Representation of data structure in memory is known as |
| A. | Recursive |
| B. | Abstract data type |
| C. | Storage structure |
| D. | File structure |
| Answer» C. Storage structure | |
| 29. |
What is default storage class of variables in C language? |
| A. | extern |
| B. | local |
| C. | auto |
| D. | global |
| Answer» D. global | |
| 30. |
Which of the following has compilation error in C? |
| A. | int n = 32; |
| B. | char ch = 65; |
| C. | float f = (float) 3.2; |
| D. | None of the above |
| Answer» E. | |
| 31. |
myarr[5] is equivalent of? |
| A. | &(myarr + 5) |
| B. | *(myarr + 5) |
| C. | (*myarr + 5) |
| D. | None of the above |
| Answer» C. (*myarr + 5) | |
| 32. |
A full binary tree with n leaves contains |
| A. | n nodes |
| B. | 2n - 1 nodes |
| C. | log2 n nodes |
| D. | 2n nodes |
| Answer» C. log2 n nodes | |
| 33. |
How many times is a do while loop guaranteed to loop? |
| A. | 0 |
| B. | Variable |
| C. | 1 |
| D. | Infinitely |
| Answer» D. Infinitely | |