[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

C Programming :: Functions - Discussion

Home > C Programming > Functions > MCQs Questions Discussion

23 / 53

What is the output of the following 'C' program ?

#include <stdio.h>
int i = 10;
void f1(void)
{
static int k; 
i = 50; 
printf("%d\n",k);
}

int main()
{
int j;
f1();
i = 0;
printf("in main %d\n",i);
f1();
printf("after call %d\n",i);
return 0;
}

A0 in main 0 0 after call 50

B0 in main 0 0 after call 0

C0 in main 10 0 after call 50

DCompilation Error

Answer: Option (Login/Signup)

Show Explanation

Asked In ::

Post Your Answer Here:     

No Discussion on this question yet!