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 the best way of making my program efficient?
What are the features of the c language?
Differentiate between a structure and a union.
write a pgm to print 1 1 2 1 1 2 3 2 1 1 2 3 4 3 2 1
A stack can be implemented only using array?if not what is used?
how to use enum datatype?Please explain me?
Describe the order of precedence with regards to operators in C.
in any language the sound structure of that language depends on its a) character set, input/output function, its control structures b) character set, library functions, input/output functions its control structures c) character set, library functions, control sturctures d) character set, operators, its control structures
Derive the complexity expression for AVL tree?
what is c language.
Can the sizeof operator be used to tell the size of an array passed to a function?
#include<stdio.h> int f(int,int); int main() { printf("%d",f(20,1)); return 0; } int f(int n,int k) { if(n==0) return 0; else if(n%2)return f(n/2,2*k)+k; else return f(n/2,2*k)-k; } how this program is working and generating output as 9....?