B. uxTaskPriorityGet() cannot be called with a TaskHandle_t.
C. printf format specifier is incorrect.
D. uxPriority should be a pointer.
Solution
Step 1: Check variable initialization
xHandle is declared but not assigned any value before use.
Step 2: Understand consequences of uninitialized handle
Passing an uninitialized handle to uxTaskPriorityGet() leads to undefined behavior or incorrect priority reading.
Final Answer:
xHandle is uninitialized before use. -> Option A
Quick Check:
Always initialize task handles before use [OK]
Hint: Initialize task handle before getting priority [OK]
Common Mistakes:
Ignoring uninitialized variables
Misunderstanding function parameter types
Assuming pointer needed for uxPriority
5.
You want to check if the current task has higher priority than another task named "WorkerTask". Which code snippet correctly compares their priorities?