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 the use of static variable in c?

596


How can I read in an object file and jump to locations in it?

581


Suppose we have a table name EMP as below. We want to perform a operation in which, I want to change name ‘SMITH’ from as ‘SMITH JAIN’. Also I want to change the name of the column from ENAME to E_NAME. EMPNO ENAME JOB MGR HIREDATE SAL 7369 SMITH Coder 7902 17-DEC-80 800 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 7521 WARD SALESMAN 7698 22-FEB-81 1250

1510


What are actual arguments?

647


a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list

633






Can one function call another?

628


Implement bit Array in C.

678


What is a nested formula?

607


Is the exit() function same as the return statement? Explain.

664


How will you delete a node in DLL?

686


What is time complexity c?

568


What does static variable mean in c?

654


Difference between strcpy() and memcpy() function?

680


Who is the main contributor in designing the c language after dennis ritchie?

554


Write a factorial program using C.

645