Bird
0
0

Which of the following is the correct way to define a FreeRTOS task function prototype?

easy📝 Syntax Q3 of 15
FreeRTOS - RTOS Fundamentals
Which of the following is the correct way to define a FreeRTOS task function prototype?
Avoid TaskFunction(void *pvParameters);
Bint TaskFunction();
Cvoid TaskFunction();
Dvoid TaskFunction(int param);
Step-by-Step Solution
Solution:
  1. Step 1: Recall FreeRTOS task function signature

    FreeRTOS tasks must have a void return type and accept a void pointer parameter.
  2. Step 2: Match the correct prototype

    Only void TaskFunction(void *pvParameters); matches this signature exactly.
  3. Final Answer:

    void TaskFunction(void *pvParameters); -> Option A
  4. Quick Check:

    Task function signature = void with void* param [OK]
Quick Trick: Task functions take void* parameter and return void [OK]
Common Mistakes:
  • Omitting parameter
  • Using wrong return type
  • Using int parameter instead of void*

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes