What is the difference between static and global variables?
Answer Posted / kush joshi
static variable only can access within a function where
these declared, but the global variables access any where in
the program.
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
Which is best book for data structures in c?
find the sum of two matrices and WAP for it.
How do you define a string?
Write a code to generate a series where the next element is the sum of last k terms.
What 'lex' does?
What will be the outcome of the following conditional statement if the value of variable s is 10?
What is data structure in c programming?
Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)
main() { struct s1 { char *str; struct s1 *ptr; }; static struct s1 arr[] = { {"Hyderabad",arr+1}, {"Bangalore",arr+2}, {"Delhi",arr} }; struct s1 *p[3]; int i; < BR> for(i=0;i<=2;i++) p[i] = arr[i].ptr; printf("%s ",(*p)->str); printf("%s ",(++*p)->str); printf("%s ",((*p)++)->str); }
How can I write a function analogous to scanf?
Explain what is the benefit of using const for declaring constants?
What are the types of pointers in c?
What is the meaning of && in c?
what is different between auto and local static? why should we use local static?
How will you print TATA alone from TATA POWER using string copy and concate commands in C?