extern static int i
func()
{
i =10;
i++;
printf("%d \n",i);
}
main()
{
i =20;
printf("%d \n",i);
func();
printf("%d \n",i);
}
Answers were Sorted based on User's Feedback
Answer / vadivelt
Program should give compiler error. Cos, u r trying to
allocate two different storage area to sigle int
variable 'i'.
ie.,
The below statement is invalid.
extern static int i;
| Is This Answer Correct ? | 8 Yes | 1 No |
What does volatile do?
do ne body have any idea about the salary for the we r going to have interview. yup .. u got it right ..i m talking abt NIC.
What is the difference between malloc() and realloc()?
How can I write a function analogous to scanf?
What are preprocessor directives?
#include<stdio.h> { printf("Hello"); } how compile time affects when we add additional header file <conio.h>.
What is the size of a union variable?
what will be the output: main(){char ch;int a=10;printf("%d",ch);}
36 Answers Accenture, TCS, Wipro,
write a function for strtok()??
What is the difference between constant pointer and constant variable?
Consider the following C program. #include <stdio.h> int main() { int i; for (i=0;i<3;++i) { fork();fork(); } } How many processes are created when running this program (including the initial one)? Explain
what are the general concepts of c and c++