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 is declaration and definition in c?
Rapunzel walks into the forest of forgetfullness. She meets a Lion who lies on Monday Tuesdays and Wednesdays and meets a rabbit who lies on Thurs fridays and saturdays . On that day both say that "I lied yesterday". What day is it .
How can I call a function with an argument list built up at run time?
What are valid signatures for the Main function?
Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.
What does %c mean in c?
How to print all the 26 alphabets in this order in C. AbCdEfGh..... it should print dynamically from a to z and do not print this using pgm like this print("Ab......"); Use loops or anything to print all alphabets
Program to display given 3 integers in ascending order
List out few of the applications that make use of Multilinked Structures?
How to set file pointer to beginning c?
What is the difference between void main and main in c?
program for validity of triangle from 3 side