Monthly Archives: October 2012

Memory Layout of C Programs

A typical memory representation of C program consists of following sections. 1. Text segment 2. Initialized data segment 3. Uninitialized data segment 4. Stack 5. Heap A typical memory layout of a running process 1. Text Segment: A text segment … Continue reading

Posted in Uncategorized | Leave a comment

Adding more to function overloading in c++

Predict the output of following C++ program. #include<iostream> using namespace std; class Test { protected:     int x; public:     Test (int i):x(i) { }     void fun() const     {         cout << “fun() const called ” << endl;     }     void fun()     {         cout … Continue reading

Posted in cpp facts | Leave a comment