

MCQOPTIONS
Saved Bookmarks
1. |
What will be the output of the following C code if these two files namely sample.c and sample1.c are linked and run? -------file sample.c------- #include <stdio.h> #include ""sample.h"" int main() { n = 12; printf(""%d "", n); function(); } -----file sample1.c------ #include <stdio.h> #include ""sample.h"" int function() { printf(""%d n"", n); } -----file sample.h----- #include <stdio.h> #include <stdlib.h> static int n; |
A. | 0 0 |
B. | 0 12 |
C. | 12 0 |
D. | 12 12 |
E. | None of these |
Answer» D. 12 12 | |