How to overload new operator in c++

Answers were Sorted based on User's Feedback



How to overload new operator in c++..

Answer / r.ramakrishna

We want use the new operator in overloading by defining the
new()operator with the fallowing operation in the class.

Is This Answer Correct ?    3 Yes 2 No

How to overload new operator in c++..

Answer / guest

class[] ob=new class[5];
ob[1]= new class();
ob[2]= new class();
ob[3]= new class();
ob[4]= new class();
ob[5]= new class();

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More OOPS Interview Questions

whats the difference between c and c++

7 Answers   Syntel,


Why do we use inheritance?

0 Answers  


What does the keyword "static" mean?

4 Answers   TCS,


143.what is oops principles?

10 Answers  


what are the different types of qualifier in java?

0 Answers   TCS,






#include <string.h> #include <stdio.h> #include <stdlib.h> #include <conio.h> void select(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); select(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void select(char *items, int count) { register int a, b, c; int exchange; char t; for(a = 0; a < count-1; ++a) { exchange = 0; c = a; t = items[ a ]; for(b = a + 1; b < count; ++b) { if(items[ b ] < t) { c = b; t = items[ b ]; exchange = 1; } } if(exchange) { items[ c ] = items[ a ]; items[ a ] = t; } } } design an algorithm for Selection Sort

0 Answers  


What is property in oops?

0 Answers  


What is coupling in oops?

0 Answers  


What is the expansion of OOPS?

24 Answers   TCS,


Is oop better than procedural?

0 Answers  


IN PROGRAMING LANGAUGE A C++ IS PURELY OBJECT ORIENTED OR NOT?

2 Answers  


What is abstraction with example?

0 Answers  


Categories