Bird
0
0

Which of the following is the correct way to assign a priority of 3 to a task in FreeRTOS using xTaskCreate?

easy📝 Syntax Q12 of 15
FreeRTOS - Task Creation and Management

Which of the following is the correct way to assign a priority of 3 to a task in FreeRTOS using xTaskCreate?

void vTaskFunction(void *pvParameters) { /* Task code */ }

xTaskCreate(vTaskFunction, "Task1", 1000, NULL, ?, NULL);
AtaskPriority = 3
B"3"
Cpriority = 3
D3
Step-by-Step Solution
Solution:
  1. Step 1: Check xTaskCreate parameters

    The fifth parameter is the task priority and expects an integer value.
  2. Step 2: Identify correct priority assignment

    Passing 3 directly as an integer is correct; strings or assignments are invalid here.
  3. Final Answer:

    3 -> Option D
  4. Quick Check:

    Priority parameter = integer value [OK]
Quick Trick: Priority is an integer, no quotes or assignments [OK]
Common Mistakes:
  • Using quotes around priority number
  • Writing assignment expressions inside parameters
  • Passing variable names without declaration

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes