What is the difference between creating an object,
using 'new' and using 'malloc'?
Answer Posted / guna
malloc
1) can't initialize the memory
2)type casting is required
3)malloc is a function.
4)can't be overloaded.
new
1) memory can be initialized
2)no type casting for operator
3)new is an operator
4)can be overloaded.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Which should be more useful: the protected and public virtuals?
How do you write a function that can reverse a linked-list in C++?
Write a program to concatenate two strings.
What does malloc return in C and C++?
What is the copy-and-swap idiom?
What does and I oop and sksksk mean?
Get me a number puzzle game-program
When you overload member functions, in what ways must they differ?
What are the uses of typedef in a program?
What is the difference between global int and static int declaration?
Can the creation of operator** is allowed to perform the to-the-power-of operations?
What language is a dll written in?
How can you quickly find the number of elements stored in a dynamic array?
Q1. A. What is unary operator? List out the different operators involved in the unary operator. B. What is an adjust field format flag? Q2. A. Distinguish between a # include and #define. B. Can a list of string be stored within a two dimensional array? Q3. A.Explain how a pointer to function can be declared in C++? B.List the merits and demerits of declaring a nested class in C++? Q4. A. What are the syntactic rules to be avoid ambiguity in multiple inheritence? B. Explain the operation of overloading of an assignment operator. Q5. A. Explain how the virtual base class is different from the conventional base classes of the opps. B. Explain how an exception handler is defined and invoked in a Program. Q6. A. What is a binary file? List the merits and demerits of the binary file usagein C++. B. Write short notes on Text Manipulation Routines. C. Write bites in Turbo c++ Header (“Include”) Files.
How do you clear a map in c++?