GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Tech FAQs  >  OOPS
Go To First  |  Previous Question  |  Next Question 
 OOPS  |  Question 78 of 255    Print  
Where does global, static, local, register variables, free memory and C Program instructions get stored?

  
Total Answers and Comments: 2 Last Update: October 27, 2005   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
September 19, 2005 05:52:51   #1  
yogeshpanda Member Since: September 2005   Contribution: 50    

RE: Where does global, static, local, register variab...

Local is stored in the stack. Register variables are stores in the registers. Global,static variables are stores in the Heap.


 
Is this answer useful? Yes | No
October 27, 2005 05:14:30   #2  
Nisar        

RE: Where does global, static, local, register variab...

local variables are stored in stack.

register variable in registers

global and static in data segment

in heap the memory created dynamically are stored


 
Is this answer useful? Yes | No

 Related Questions

Latest Answer : All the solutions above are reading the source code with the files concepts.find a solution where you do not have a source file to read the contents.There is a macro or an attiribute which tells the compiler the name of the program, function or the attribute. ...

Latest Answer : In C it is System("program_to_run.exe"); In Windows it can be ShellExecute(); or WinExec(); ...

Latest Answer : This can be done Using _asm{} operator, first  char* mem_ptr; Mov EAX, DWORD PTR[Memory Address] Then...  Mov mem_ptr, EAX  Now mem_ptr will point to the meory location needed and we can access ...

Latest Answer : In linux there is a memory debugging tool valgrind.With the help of valgrind, you can easily check the memory allocation or memory deallocation. ...

Latest Answer : In Linux/Unix , we have the header file dirent.h.This .h file contains the direcory manipulation functions Some of the functions are opendir,closedir,readdir. ...

Latest Answer : #include main(int argc, char *argv[]){  printf("Removing: %s...n", argv[0]);  remove(argv[0]);} ...

Latest Answer : 7150u have to worry because this is a master program i had created when i started with c ...

Latest Answer : typedef enum {read,blue,green}color; void main() { color a = 1;    // Error in C++} ...

What will happen if I allocate memory using "new" and free it using "free" or allocate sing "calloc" and free it using "delete"?

Latest Answer : Memory alignment is the restriction imposed on memory allocation in such a way that values associated with multibyte get assigned only at certain places of memory. Such Memory alignment though generally not very common issue in OOPS terminology as the ...


 Sponsored Links

 
Related Articles

ODP.NET - Working with Bind Variables together with OracleParameter

ODP NET Working with Bind Variables together with OracleParameter With the help of OracleParameter you can include bind variables within any SQL statement These bind variables are nothing but run time query parameters The values in the SQL statement are bound at run time when we use bind variables m
 

Microsoft AJAX Library - Functions as Variables

Functions as Variables In JavaScript functions are first class objects This means that a function is regarded as a data type whose values can be saved in local variables passed as parameters and so on For example when defining a function you can assign it to a variable and then call the function thr
 

OOPS Tutorials

Object oriented programming OOP is a computer science term used to characterize a programming language that began development in the 1960’ s The term object oriented programming’ was originally coined by Xerox PARC to designate a computer application that describes the methodol
 

C++ Memory Management operators

C Memory Management operators Need for Memory Management operators The concept of arrays has a block of memory reserved The disadvantage with the concept of arrays is that the programmer must know while programming the size of memory to be allocated in addition to the array size remaining constant m
 

C++ Static Functions

C Static Functions Static member functions have a class scope and they do not have access to the this pointer of the class When a member is declared as static a static member of class it has only one data for the entire class even though there are many objects created for the class The main usage of
 

What are the differences between stored procedures and triggers?

Stored procedures are compiled collection of programs or SQL statements that live in the database. A stored procedure can access and modify data present in many tables. Also a stored procedure is not associated with any particular database object. But triggers are event-driven special procedures whi
 

How to develop compile and run a C program

The steps involved in building a C program are: 1. First program is created by using any text editor and the file is stored with extension as .c 2. Next the program is compiled. There are many compilers available like GNU C compiler called as gcc, Sun compiler, Borland compiler which is pop
 

Swap two variables

How to swap two variables without using third variable? A variable is a named location in memory that is used to store data which can be modified in a program. Let us learn how to swap two variables without using third variable. This can be done in number of ways By using arithmetic operators
 

Increase your Job Outlook on Global Scale

Increase your Job Outlook on Global Scale The advent of both globalization and outsourcing are factors that are changing the world These elements have allowed the world to become much more interconnected and the differences between cultures which existed in the past have largely been reduced While m
 

JavaScript Variables

JavaScript Variables In this JavaScript tutorial you will learn about JavaScript variables rules for variable names in JavaScript declaration of variable in JavaScript variables usage JavaScript in external file how to place the JavaScript in external file and how to execute this JavaScript placed i
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape