How to overload new operator in c++
Answers were Sorted based on User's Feedback
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 |
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 |
whats the difference between c and c++
Why do we use inheritance?
What does the keyword "static" mean?
143.what is oops principles?
what are the different types of qualifier in java?
#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
What is property in oops?
What is coupling in oops?
What is the expansion of OOPS?
Is oop better than procedural?
IN PROGRAMING LANGAUGE A C++ IS PURELY OBJECT ORIENTED OR NOT?
What is abstraction with example?