What are local and global variables?

Answer Posted / pushpendra

local variable:-its uses inside the function that is these variable exist inside the function and other fu no access out side the main function.
while global variables are variables and which are declared both sides of function inside and outside that is globally.all functions can access out of main function.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is calloc()?

626


Tell me can the size of an array be declared at runtime?

595


what is the syallabus of computer science students in group- 1?

1837


Mention four important string handling functions in c languages .

620


What does a pointer variable always consist of?

660






Why use int main instead of void main?

591


how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions

2719


What is function prototype in c language?

610


Explain what is the purpose of "extern" keyword in a function declaration?

616


What is an lvalue?

634


Explain how can you determine the size of an allocated portion of memory?

620


How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?

15495


What is a sequential access file?

644


When do we get logical errors?

635


What are the benefits of organizational structure?

568