MCQOPTIONS
Saved Bookmarks
This section includes 5 Mcqs, each offering curated multiple-choice questions to sharpen your Arduino knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What does the following code do?int* ptr = (int*)malloc(100 * sizeof(int)); |
| A. | Static Memory Allocation |
| B. | Static Memory Clearance |
| C. | Dynamic Memory Allocation |
| D. | Dynamic Memory Clearance |
| Answer» D. Dynamic Memory Clearance | |
| 2. |
What notation should we use for denoting the breadth of an array? |
| A. | sizeof(a[0]) |
| B. | sizeof(a) |
| C. | sizeof(a[]) |
| D. | sizeof(a.0) |
| Answer» B. sizeof(a) | |
| 3. |
What function will we use to find out the number of elements in an array? |
| A. | sizeof() |
| B. | size() |
| C. | sf() |
| D. | sizeOf() |
| Answer» B. size() | |
| 4. |
When the sizeof() function is invoked on an array. What information does it return? |
| A. | Number of elements in the array |
| B. | The largest element in the array |
| C. | The total sum of the ASCII values of the elements in the array |
| D. | The largest ASCII value of any element in the array |
| Answer» B. The largest element in the array | |
| 5. |
What is the meaning of the data returned by the sizeof() function? |
| A. | Length |
| B. | Location |
| C. | Pointer |
| D. | Memory |
| Answer» B. Location | |