Complete the code to declare a buffer for runtime stats.
char statsBuffer[[1]];The buffer size should be large enough to hold the runtime stats string. 1024 bytes is a common safe size.
Complete the code to call vTaskGetRunTimeStats with the buffer.
vTaskGetRunTimeStats([1]);The function expects a pointer to a char array, so passing the array name (statsBuffer) is correct.
Fix the error in printing the runtime stats string.
printf("CPU Usage:\n%s", [1]);
printf expects a char pointer for %s, so passing statsBuffer (the array name) is correct.
Fill both blanks to declare and initialize the buffer, then get runtime stats.
char [1][512]; vTaskGetRunTimeStats([2]);
The buffer is declared as statsBuffer and passed to vTaskGetRunTimeStats.
Fill all three blanks to declare buffer, get stats, and print them.
char [1][1024]; vTaskGetRunTimeStats([2]); printf("Task CPU Usage:\n%s", [3]);
The buffer is named statsBuffer, passed to vTaskGetRunTimeStats, and printed.