GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Programming  >  C++
Go To First  |  Previous Question  |  Next Question 
 C++  |  Question 68 of 203    Print  
How can we define a dynamic memory allocation in UNIX operating system?

  
Total Answers and Comments: 1 Last Update: February 26, 2006     Asked by: sachinp1979 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
February 26, 2006 06:20:48   #1  
ranjith_14r Member Since: February 2006   Contribution: 1    

RE: How can we define a dynamic memory allocation in U...
Its just by using new and delete operators which will allocate at runtime as in C++In C v hav to use malloc free operators .
 
Is this answer useful? Yes | No

 Related Questions

A scope resolution operator (::), can be used to define the member functions of a class outside the class.  
Latest Answer : Scope resolution:As the name itself indicates,it resolves global scope to local scopeEx:int a=10;int main(){a=20;cout

The free subroutine frees a block of memory previously allocated by the malloc subroutine. Undefined results occur if the Pointer parameter is not a valid pointer. If the Pointer parameter is a null value, 
Latest Answer : free() - releases the memory of the pointer passed as parameter, to the OS/application consumption. Using the pointer after free() will result in undefinded resultsrealloc() - used to resize the memory held by the pointer to the number of bytes specificed. ...

Runtime type identification (RTTI) lets you find the dynamic type of an object when you have only a pointer or a reference to the base type. RTTI is the official way in standard C++ to discover the type 
Latest Answer : We can only assign a derived object to a base object pointer and a base class member to a derived class member pointer. ...

Virtual destructors: If an object (with a non-virtual destructor) is destroyed explicitly by applying the delete operator to a base-class pointer to the object, the base-class destructor function (matching 
Latest Answer : Virtual constructor is not build-in C++ feature but it doesn't mean its not used by devs in code and in conversations. There are many other things that doesn't exist in particular language yet, people find ways around to solve it (SingleTon, Virtual Constructor, ...

Latest Answer : Memory leak is - dynamically allocating memory and forgeting to free it. In C++, using a new operator to allocate a chunk of memory, and forgetting to delete it. There are several reasons this could occur. Some of them are,1. Allocate a chunk of memory ...
Read Answers (4) | Asked by : gopala krishna

Latest Answer : Its just by using new and delete operators which will allocate at runtime as in C++In C,v hav to use malloc,free operators . ...

How is static variable stored in the memory?( if there are 2 functions in a file,and the static variable name is same (ex var) in both the function. how is it keep seperately in the memory).

Read Answers (7) | Asked by : prabhakar pillai

Latest Answer : Copy constructor is 1. a constructor function with the same name as the class 2. used to make deep copy of objects. There are 3 important places where a copy constructor is called. 1. When an object is created from another object of the same type 2. When ...

Latest Answer : To avoid memmory leaks you should use smart pointers. ...


 Sponsored Links

 
Related Articles

Concepts of Object-Oriented Programming

Object Oriented JavaScript In this chapter you ll learn about OOP Object Oriented Programming and how it relates to JavaScript As an ASP NET developer you probably have some experience working with objects and you may even be familiar with concepts such as inheritance However unless you re already a
 

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
 

How to call C header that is not provided generally by system in C++?

Headers can be called by using extern C Syntax of extern C is: extern "C" <function declaration> for example to call C functions from C++ we can write extern "C" { <function declaration> <function declaration> ...
 

How to define command line arguments

The main functions can have arguments passed which are called as command line arguments. There are two command line arguments: Argument count denoted by argc and Argument vector denoted by argv The argc is an integer variable which denotes the number of parameters passed and argv is pointer to a
 

SQL Programming

SQL Programming Overview Anybody who has done something for a long time has probably wanted to change how things work at some point or another. A worker at a mill might have found a more efficient way of cutting logs, or a mathematics teacher might have had a hand in changing a school’s al
 

System Implementation

In the previous articles relating to SDLC Stages we discussed about Project Planning and Feasibility Study moved on to System Analysis and Requirements which lead to Systems Design. Systems Design will naturally lead to another stage where it becomes closer to the actual deployment of the p
 

System Analysis and Requirements

In the previous chapter, we’ve discussed about project planning and feasibility study. That stage was important because it tries to establish a problem in our highly technological world. As our understanding on what we can do in computers evolve and so are the things that we need to make t
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

WinRunner Programming Concepts

If you want to create WinRunner scripts that are highly efficient, there are important programming concepts that you will want to become familiar with. Understanding these concepts will provide you with a large number of key benefits. In addition to understanding these concepts, you must also learn
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape