Multiple choice technology programming languages

What will be the output of the following code? #include<stdio.h> int main() {     int num,a=5;     num=-a--;     printf("%d  %d",num,a); }

  1. 5,4

  2. -4,4

  3. -5,4

  4. -4,5

  5. Compilation Error

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The post-decrement operator a-- evaluates to the current value of a (which is 5) before decrementing a to 4. Therefore, num is assigned -5. The final values printed for num and a are -5 and 4, matching the marked choice.