Wipro Question:
Download Questions PDF

What is Memory management in C in Wipro?

Wipro Interview Question
Wipro Interview Question

Answer:

The C programming language manages memory statically, automatically, or dynamically.
Static-duration variables are allocated in main memory, usually along with the executable code of the program, and persist for the lifetime of the program
Automatic-duration variables are allocated on the stack and come and go as functions are called and return.
For static-duration and automatic-duration variables, the size of the allocation is required to be compile-time constant.
Dynamic memory allocation in which memory is more explicitly (but more flexibly) managed, typically, by allocating it from the heap, an area of memory structured for this purpose.
In C, the library function malloc is used to allocate a block of memory on the heap. The program accesses this block of memory via a pointer that malloc returns. When the memory is no longer needed, the pointer is passed to free which deallocates the memory so that it can be used for other purposes.

Download Wipro Interview Questions And Answers PDF

Previous QuestionNext Question
It is better to read books such as Barrons on verbal ability. There are questions available on this website which is related to technical. Here are some questions which give you an understanding about the process and the method you need to prepare: -What is Functionality of Operating System in Wipro?