Bird
0
0

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

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

    Task functions must return void and accept a void pointer parameter.
  2. Step 2: Check options for correct signature

    Only void TaskFunction(void *pvParameters) matches the required signature.
  3. Final Answer:

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

    Correct task function signature = B [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