ExamVeda
Login
Home
51
What will be the output of the following C code if these two files namely test.c and test1.c are linked and run?
-------file test.c-------
#include <stdio.h>
#include ""test.h""
int main()
{
  i = 10;
  printf(""%d "", i);
  foo();
}

-----file test1.c------
#include <stdio.h>
#include ""test.h""
int foo()
{
  printf(""%d\n"", i);
}

-----file test.h-----
#include <stdio.h>
#include <stdlib.h>
static int i;
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
52
What is the scope of a function?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
53
What will be the output of the following C code (after linking to source file having definition of ary1)?
#include <stdio.h>
int main()
{
    extern ary1[];
    printf("%d\n", ary1[0]);
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
54
The C-preprocessors are specified with . . . . . . . . symbol.
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
55
Automatic variables are stored in . . . . . . . .
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
56
Register variables reside in . . . . . . . .
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
57
For each #if, #ifdef, and #ifndef directive.
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
58
Automatic variables are . . . . . . . .
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
59
Comment on the output of the following C code.
#include <stdio.h>
#include "test.h"
#include "test.h"
int main()
{
    //some code
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
60
Property of the external variable to be accessed by any source file is called by the C90 standard as . . . . . . . .
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board