answersLogoWhite

0

What is the use of new in C?

User Avatar

Anonymous

13y ago
Updated: 8/20/2019

Nothing. Or you wanted to ask about C++.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

What are new and delete operators in c plus plus?

New and Delete are the memory management operators in c++,like c language we use malloc() and calloc() functions to allocate memory and free() functiong to release the memory similarily we use new to allocate memory in C++ and Delete to release the allocated memory....


What is the memory management operator in c plus plus?

There is no memory management operator in C++ -- it is an unmanaged language. You use the C++ new operator to allocate memory, and use the C++ delete operator to release previously allocated memory.


What keyword is using to create objects?

In C# and Visual Basic.NET the keyword is "new". C doesn't have such an animal, but you generally use the library call to malloc to get new memory.


Why use new and delete operator overloading in c plus plus?

one reason to use new and delete operator overloading in c++ is when you are using your own memory manager code. when the user of your code calls the new keywork, your memory manager code can allocate memory.


How c plus plus objects are allocated memory?

With the new operator.myclass myclasspointer = new myclass;...use the classdelete myclasspointer;


How does C Plus Plus handle dynamic memory allocation?

To allocate memory in C++ you use the new operator. To release the memory, you use the delete operator.double *myArray = new float [1000];//check and usedelete [] myArray;myClass *myClassInstance = new myClass;//check and usedelete myClassInstance;


How do you press the caliper piston in to put new pads on a 99 Chevy?

I use a "C" clamp.


The keyboard shortcut used to copy text is ctrl?

Ctrl + c. To paste it into a new location or into a new document use: Ctrl + v.


How do you create an object in c?

object thing = new object();use the keyword new, followed by the classname, then (), perhaps with some arguments within ().


What are the best books for learning C right from scratch?

if you are new C then "Let Us C" by Yashavant P. Kanetkar, else you can use "The C Programming Language" by Brian W. Kernighan & Dennis M. Ritchie


Why you use zero instead of NULL in c plus plus?

In C++ NULL is defined as 0. It's a design failure, will be fixed with a new 'nullptr' keyword.


What is the difference between delete and free?

Are you talking about freeing dynamically allocated memory in C/C++? free() is a function that you use to release dynamically (i.e. at run-time) created memory in C, using malloc() or alloc() or such other functions. In the same way, delete() is a function that is used in C++ to release memory created at run-time using the function new(). (Note that you can still use malloc and other C functions in your C++ code, but it is not considered a good programming habit. Moreover, new() is easier to use and more flexible, once you get the hang of it. If this is not what you had in mind, then I do not know if this will be of any help to you. addition: -new is constructor of which delete is destructor so use in pairs always.. similarly use malloc with free.. extra note: - no type cast required for new , whereas malloc, free may require it. - new returns exception whereas malloc returns NULL when memory issue.