-
Which of the following is the correct output for the program given below?
#include<stdio.h>
int main()
{
const int k = 10;
printf("%d\n", k++);
return 0;
}
-
- 10
- 1 1
- No output
- Error: ++ needs a l value
Correct Option: D
k is a constant, so increment of read-only variable ‘k’ is not possible.
Error: ++ needs a l value