ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
what is diff between localstatic and globalstatis variable
possible 2 use in another file...?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: what is diff between localstatic and globalstatis variable possible 2 use in another file...?
Answer
# 1
localstatic belong  to that only that function .
globalestatic belong 2whole file. not possible.
 
Is This Answer Correct ?    4 Yes 1 No
Guest
 
  Re: what is diff between localstatic and globalstatis variable possible 2 use in another file...?
Answer
# 2
Local Static
============
The scope of the variable is only within the function where 
it is declared, throughout the program. ie the value is 
preserved until the end of the program.


Global Static
=============
The scope of the variable is only within the file where it 
is declared, throughout the program. ie the value is 
preserved until the end of the program.

Global Static variables are not visible outside the files 
where they are declared.
 
Is This Answer Correct ?    5 Yes 0 No
Abdur Rab
 
 
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
What's wrong with "char *p; *p = malloc(10);"?  5
can anyone proide me reading material on svit00ef27@yahoo.com please thanx in advance IBM1
difference of two no's with out using - operator  6
What is the difference between null pointer and the void pointer?  2
6)swap(int x,y) { int temp; temp=x; x=y; y=temp; } main() { int x=2;y=3; swap(x,y); } after calling swap ,what are yhe values x&y?  2
write a program in 'c' to find the value of p[i+1]^n.p,i,n are arguments of a macro and n is a integer  1
how can i get output like this? 1 2 3 4 5 6 Excel3
HOW TO HANDLE EXCEPTIONS IN C  5
why r u join this company? give solid resons. Infosys7
whether itis a structured language? Microsoft1
What's the difference between calloc() and malloc()?  3
what does the following function print? func(int i) { if(i%2)return 0; eale return 1; } main() { int =3; i=func(i); i=func(i); printf("%d",i);} TCS8
What is sparse file?  1
# define prod(a,b)=a*b main() { int x=2; int y=3; printf("%d",prod(x+2,y-10)); } the output of the program is a.8 b.6 c.7 d.none TCS5
simple c program for 12345 convert 54321 with out using string  5
Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it?  3
Study the Following Points: a.One Cannot Take the address of a Bit Field b.bit fields cannot be arrayed c.Bit-Fields are machine Dependant d.Bit-fields cannot be declared as static 1. Which of the Following Statements are true w.r.t Bit- Fields A)a,b&c B)Only a & b C)Only c D)All Accenture2
There are 3 baskets of fruits with worng lables,one basket has apple,another basket has orange,another has combination of apple and orange,what is the least way of interchange the lables. Google10
WAP to accept first name,middle name & last name of a student display its initials? NIIT2
How to reverse a string using a recursive function, without swapping or using an extra memory? Motorola18
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com