What is the difference between static and global variables?



What is the difference between static and global variables?..

Answer / 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

More C Interview Questions

write a 'c' program to sum the number of integer values

8 Answers  


the operator for exponencation is a.** b.^ c.% d.not available

5 Answers   TCS,


what is foreign key in c language?

1 Answers   ADP,


what is the value of b if a=5; b=++a + ++a

31 Answers   Infosys, TCS, Tech Mahindra,


What are header files in c programming?

0 Answers  


How does normalization of huge pointer works?

0 Answers  


A SIMPLE PROGRAM OF GRAPHICS AND THEIR OUTPUT I WANT SEE WAHAT OUTOUT OF GRAPHICS PROGRAM

0 Answers   HCL,


52.write a “Hello World” program in “c” without using a semicolon? 53.Give a method to count the number of ones in a 32 bit number? 54.write a program that print itself even if the source file is deleted? 55.Given an unsigned integer, find if the number is power of 2?

9 Answers  


write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays

0 Answers   IBM,


How to find a missed value, if you want to store 100 values in a 99 sized array?

0 Answers   Honeywell, Zomato,


What is type qualifiers?

0 Answers  


int main() { int i=-1,j=-1;k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d%d%d%d%d",i,j,k,l,m); }

3 Answers   HCL,


Categories