Complete the code to create a queue with 5 items, each of size sizeof(int).
QueueHandle_t queue = xQueueCreate([1], sizeof(int));The first parameter of xQueueCreate() is the number of items the queue can hold. Here, 5 is correct.
Complete the code to create a queue that holds 10 items, each of size sizeof(char).
QueueHandle_t queue = xQueueCreate([1], sizeof(char));The queue length is 10, so the first parameter should be 10.
Fix the error in the code to create a queue for 3 items of size sizeof(float).
QueueHandle_t queue = xQueueCreate([1], sizeof(float));The queue length must be a positive integer. 3 is correct here.
Fill both blanks to create a queue that holds 7 items, each of size sizeof(uint32_t).
QueueHandle_t queue = xQueueCreate([1], [2]);
The first blank is the number of items (7), the second blank is the size of each item (sizeof(uint32_t)).
Fill all three blanks to create a queue for 4 items, each of size sizeof(char), and check if the queue was created successfully.
QueueHandle_t queue = xQueueCreate([1], [2]); if (queue == [3]) { // Handle error }
The queue length is 4, item size is sizeof(char), and the queue handle is checked against NULL to detect failure.
