MCQOPTIONS
Saved Bookmarks
This section includes 4 Mcqs, each offering curated multiple-choice questions to sharpen your C Interview knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What if size is zero in the following C statement? |
| A. | Allocate a memory location with zero length |
| B. | Free the memory pointed to by ptr |
| C. | Undefined behaviour |
| D. | Doesn’t do any reallocation of ptr i.e. no operationView Answer |
| Answer» C. Undefined behaviour | |
| 2. |
calloc() initialize memory with all bits set to zero. |
| A. | True |
| B. | False |
| C. | Depends on the compiler |
| D. | Depends on the standard |
| Answer» B. False | |
| 3. |
Which of the following will return a result most quickly for searching a given key? |
| A. | Unsorted Array |
| B. | Sorted Array |
| C. | Sorted linked list |
| D. | Binary Search Tree |
| Answer» E. | |
| 4. |
On freeing a dynamic memory, if the pointer value is not modified, then the pointer points to. |
| A. | NULL |
| B. | Other dynamically allocated memory |
| C. | The same deallocated memory location |
| D. | It points back to location it was initialized with |
| Answer» E. | |