What is meant by global static? why we have to use static
variable instead of Global variable

Answer Posted / guest

Static is protected one and you cannot acess the variable
in other files/functions.It is declared in the top of the
file/function.The value retains tho,t the program.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When should you not use a type cast?

655


if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0

1442


Explain bitwise shift operators?

627


What are the 3 types of structures?

564


In c language can we compile a program without main() function?

569






What is local and global variable in c?

612


Do you know the use of 'auto' keyword?

652


How can a program be made to print the name of a source file where an error occurs?

725


What is typedef?

660


Give the rules for variable declaration?

669


Write a program to show the change in position of a cursor using c

573


write a program that reads lines(using getline), converts each line to an integer using atoi, and computes the average of all the numbers read. also compute the standard deviation.

1979


What type of function is main ()?

581


What are type modifiers in c?

615


How do you use a pointer to a function?

625