-
What is the difference between the following 2 codes?
//Program 1
#include <stdio.h>
int main()
{
int n3, n1 = 2, n2 = 3;
n3 = n1++ + ++n2;
printf("%d %d %d", n3, n1, n2);
}//Program 2
#include <stdio.h>
int main()
{
int n3, n1 = 2, n2 = 3;
n3 = n1++ + +++n2;
printf("%d %d %d", n3, n1, n2);
}
-
- Space does make a difference, values of n1, n2, n3 are different
- No difference as space doesn’t make any difference, values of n1, n2, n3 are same in both the case
- Program 2 has syntax error, program 1 is not
- Program 1 has syntax error, program 2 is not
- None of these
Correct Option: C
Program 2 has syntax error, program 1 is not