Q. What is the value of 'a' after this code?
Code:
#include <stdio.h>
int main() {
int a = 5;
a = a++;
printf("%d", a);
return 0;
}
β
Correct Answer: (A)
5
Explanation: a++ returns the value before incrementing, and assignment overwrites the change.