in one file global variable int i; is declared as static. In
another file it is extern int i=100;
Is this valid ?
Answers were Sorted based on User's Feedback
Answer / dipti
No its in valid as a static variable cannot be declared as extern.
The whole and entire purpose of static is to declare that a variable is private to the source file that it is declared in.
| Is This Answer Correct ? | 0 Yes | 0 No |
What are data types in c language?
How does the C program handle segmentation faults?
What's wrong with "char *p; *p = malloc(10);"?
Write a program to find factorial of a number using recursive function.
What is bubble sort technique in c?
Explain pointers in c programming?
how to estimate the disk access time? e.g. the time between read one byte and another byte in the disk.
write a c program to find largest of three numbers using simple if only for one time.
how to create c progarm without void main()?
Explain what is wrong in this statement?
increment operateor (++)and decrament(--) #include<stdio.h> #inclide<conio.h> main() { int x=15; while(x!=0) scanf("%d",&x); {
#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }