1.

What is the use of reference member type in allocator?(a) Point to an element(b) Quantities of element(c) Reference to an element(d) Sequence of an elementThe question was asked in unit test.I want to ask this question from Allocators in chapter Algorithms, Objects & Iterators in C++ of C++

Answer»

The CORRECT answer is (c) Reference to an element

The BEST I can EXPLAIN: free() function is used to free the memory used by the program.

eg,

int *p = (int*) MALLOC(sizeof(int));//ALLOCATION of memory.

free(p);// freeing the memory occupied by pointer p.



Discussion

No Comment Found

Related InterviewSolutions