

MCQOPTIONS
Saved Bookmarks
1. |
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); } |
A. | Space does make a difference, values of n1, n2, n3 are different |
B. | No difference as space doesn t make any difference, values of n1, n2, n3 are same in both the case |
C. | Program 2 has syntax error, program 1 is not |
D. | Program 1 has syntax error, program 2 is not |
E. | None of these |
Answer» D. Program 1 has syntax error, program 2 is not | |