-
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;
-
- 0 0
- 0 12
- 12 0
- 12 12
- None of these
Correct Option: C
12 0