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 / phani
No its invalid.A variable declared as static cannot be
changed though it is a global variable.
| Is This Answer Correct ? | 20 Yes | 3 No |
Answer / anil
variable/function defined static make the scope limited to
only the file in which it is defined and cannot be accessed
outside the file. Hence it is invalid
| Is This Answer Correct ? | 6 Yes | 0 No |
What is a far pointer?What is the utility?
What is a pointer and how it is initialized?
program to find a smallest number in an array
What is function prototype in c language?
Tell me a C program to display the following Output? 1 1 1 1 1 2 2 2 2 3 3 3 4 4 5
#include<stdio.h> int main() { int i=2; int j=++i + ++i + i++; printf("%d\n",i); printf("%d\n",j); }
How can I automatically locate a programs configuration files in the same directory as the executable?
What are the different types of pointers used in c language?
Write a program for deleting duplicate elements in an array
What happens if a header file is included twice?
how to print the character with maximum occurence and print that number of occurence too in a string given ?
how can i include my own .h file EX:- alex.h like #include<alex.h>, rather than #include"alex.h"