answersLogoWhite

0


Best Answer

yes,it will create memory

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Could calloc assign memory for object?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

How can you allocate memory dynamically in c?

char* new_string; // could be any type new_string = (char*) malloc (5120); // allocate memory - typecast is necessary if (new_string == NULL) ... memory exception ... ... use the data ... free (new_string); // release memory when done


What is the Difference between override and new keyword in C?

An override is the specialisation of a virtual function. The new keyword instantiates an instance of an object in dynamic memory and returns a reference to that object (or null if the object could be instantiated). Both are used in C++, but not C.


Why it is required to create mainframe object on the heap?

You need to create the mainframe object on the heap so that the object does not go out of scope and get automatically deleted when your function exits. You could create it on the stack if the function doing that does not exit until everything is deleted, such as in the main loop of CWinApp. There are also issues with available memory in stack versus heap, as the stack size is preallocated while the heap can grow to the size of available memory.


Can a Java application have memory leak?

Java has a fairly sophisticated garbage collection system, and in general you don't worry about memory leaks, as they only happen in a few very specific circumstances (notably, when adding listeners to Swing GUI objects and not removing them). If you need more sophistcated memory management, java provides the clases in the java.lang.ref package.


Before DNA could definitively be shown to be the genetic material in cells scientist had to show that it could?

b. it could carry and make copies of information

Related questions

Could malloc assign memory for object?

Malloc is a memory allocation. You specify the amount of memory you need and are given a pointer to that much memory. It doesn't "assign" anything to that value, it just gives you a pointer. At that point you should put whatever you want in there.


How can you allocate memory dynamically in c?

char* new_string; // could be any type new_string = (char*) malloc (5120); // allocate memory - typecast is necessary if (new_string == NULL) ... memory exception ... ... use the data ... free (new_string); // release memory when done


Does the life policy have to be paid up or have cash value to assign as collateral?

Not nec. You could assign ownership.


How do you turn an Excel cell a colour by pressing one button?

Click on the Fill Color tool icon. You could also write a macro to change the colour and assign it to a button on the worksheet.Click on the Fill Color tool icon. You could also write a macro to change the colour and assign it to a button on the worksheet.Click on the Fill Color tool icon. You could also write a macro to change the colour and assign it to a button on the worksheet.Click on the Fill Color tool icon. You could also write a macro to change the colour and assign it to a button on the worksheet.Click on the Fill Color tool icon. You could also write a macro to change the colour and assign it to a button on the worksheet.Click on the Fill Color tool icon. You could also write a macro to change the colour and assign it to a button on the worksheet.Click on the Fill Color tool icon. You could also write a macro to change the colour and assign it to a button on the worksheet.Click on the Fill Color tool icon. You could also write a macro to change the colour and assign it to a button on the worksheet.Click on the Fill Color tool icon. You could also write a macro to change the colour and assign it to a button on the worksheet.Click on the Fill Color tool icon. You could also write a macro to change the colour and assign it to a button on the worksheet.Click on the Fill Color tool icon. You could also write a macro to change the colour and assign it to a button on the worksheet.


What is the Difference between override and new keyword in C?

An override is the specialisation of a virtual function. The new keyword instantiates an instance of an object in dynamic memory and returns a reference to that object (or null if the object could be instantiated). Both are used in C++, but not C.


What numbers could a and b represent?

Any numbers you care to assign to them.


Why it is required to create mainframe object on the heap?

You need to create the mainframe object on the heap so that the object does not go out of scope and get automatically deleted when your function exits. You could create it on the stack if the function doing that does not exit until everything is deleted, such as in the main loop of CWinApp. There are also issues with available memory in stack versus heap, as the stack size is preallocated while the heap can grow to the size of available memory.


How do you clear memory in camera memory card?

To clear memory card,you could format the memory card or put in your laptop and delete it


Which IRQ could you probably assign to a NIC without causing a conflict?

9, 10 and 11


What is a quasi experimental research design?

A quasi-experiment is an experiment where you cannot randomly assign people to groups. For example, you are either female or male. You could not assign a people as a female when they are not when conducting and experiment.


What could be wrong with a 30 year old and memory lapses?

memory loss


what are the energy levels in an electron could?

[object Object]