Answer: </I> <U>Static memory allocation</U>: The compiler allocates the required memory space for a declared variable.By using the address of operator,the reserved address is obtained and this address may be assigned to a pointer variable.Since most of the declared variable have static memory,this way of assigning pointer value to a pointer variable is known as static memory allocation. memory is assigned during compilation time.<U>Dynamic memory allocation</U>: It uses functions such as malloc( ) or calloc( ) to get memory dynamically.If these functions are used to get memory dynamically and the values returned by these functions are assingned to pointer variables, such assignments are known as dynamic memory allocation.memory is assined during run time.
Tags:Interview Questions, Languages, C,
Please submit your Interview Answer for the above Question via replying to this post. Thank you for visiting to our blog, Have a Good Day!.
Sponsor Advertisement
School Management System Software
This is One of the best School management system software in the world. School Software offers complete professional institute management system administration, library, accounting, inventory, etc for all the school activities management...
No comments:
Post a Comment