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 |
using for loop sum 2 number of any 4 digit number in c language
How can I automatically locate a programs configuration files in the same directory as the executable?
write an algorithm and a program to count the number of elements in a circularly singly linked list
What is the auto keyword good for?
Write a program to exchange two variaables without temp
Are c and c++ the same?
#define MAX 3 main() { printf("MAX = %d ",MAX ); #undef MAX #ifdef MAX printf("Vector Institute”); #endif }
write a c program to change only the 3rd bit of the particular number such that other bits are not affected.. if bitnum=10(say.. it can be any no..
how do we remove the printed character in printf statement and write next it it
#include<stdio.h> int main() { int i=2; int j=++i + ++i + i++; printf("%d\n",i); printf("%d\n",j); }
What is pragma c?
i want the code for printing the output as follows 4 4 3 3 2 2 1 1 0 1 1 2 2 3 3 4 4