Question
1.
#include
2.
#include
3.
#include
4.
using namespace std;
5.
const int bsize = 512;
6.
int *pa;
7.
bool allocate = true;
8.
void get_memory()
9.
{
10.
cerr
What is the output of this program?
1.
#include
2.
#include
3.
#include
4.
using namespace std;
5.
const int bsize = 512;
6.
int *pa;
7.
bool allocate = true;
8.
void get_memory()
9.
{
10.
cerr
Answer: Option C
Was this answer helpful ?
In this program, The memory will go beyond the limit, So there will be exhaustion in memory.
Output:
$ g++ free4.cpp
$ a.out
free store addr = 0x80a8008
Segmentation fault
Was this answer helpful ?
More Questions on This Topic :
Question 5.
Which operators are used in the free store?
....
Question 6.
What type of class member is operator new?
....
Submit Solution