Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


Share this Page URL
Help

Chapter 8. FUNCTIONS, STORAGE CLASS PREP... > 8.10 Memory Management of C++ - Pg. 8.11

Memory Management of C++ 8.11 cout<<"\n FindSum with : a and b (two ) arguments supplied"<<100<<"\ t"<<200<<"\t"<<300<<"\t"<<FindSum(100,200,300)<<endl; } //Output: Function over loading for Different Number and Different Types of Arguments calling FindArea(r) function < r >-integer argument:100 calling FindArea( r , h ) function - float 2 arguments :215.25 calling FindArea( r , h ) function - integers 2 arguments :200 a and b and c values set as default values are :10 20 30 FindSum with no arguments supplied 60 FindSum with : a (one ) arguments supplied 100 150 FindSum with : a and b (two ) arguments supplied100 200 330 FindSum with : a and b (two ) arguments supplied 100 200 300 600*/ 8.10 Memory Management of C++ The following table gives details of memory management of C++. It is important that you clearly understand the concept. Memory can be broadly divided into data area or code area also called data segment and code segment. Based on the requirements of access times, scope and life of variables, the mem- ory is divided into global, heap, code area, stack and static area, as shown in Table 8.1. Global Variables: These are declarations such as include sections, define statements, func-