Memory Allocation on C related Questions and Answers - Page 2

Question 12 : The size of both stack and heap remains the same during run time.
1. True
2. False
3.
4.
View Answer   Discuss with Members

Question 14 : Which of the following functions allocates multiple blocks of memory, each block of the same size?
1. malloc()
2. realloc()
3. calloc()
4. free()
View Answer   Discuss with Members

Question 15 : Suppose we have a one dimensional array, named 'x', which contains 10 integers. Which of the following is the correct way to allocate memory dynamically to the array 'x' using malloc()?
1. x=(int*)malloc(10);
2. x=(int*)malloc(10,sizeof(int));
3. x=malloc(int 10,sizeof(int));
4. x=(int*)malloc(10*sizeof(int));
View Answer   Discuss with Members

Question 16 : The free() function frees the memory state pointed to by a pointer and returns ___________
1. the same pointer
2. the memory address
3. no value
4. an integer value
View Answer   Discuss with Members

Question 17 : Array is preferred over linked list for the implementation of ________
1. Radix sort
2. Insertion sort
3. Binary search
4. Polynomial evaluation
View Answer   Discuss with Members

Question 18 : In the function malloc(), each byte of allocated space is initialized to zero.
1. True
2. False
3.
4.
View Answer   Discuss with Members


View 11 - 20 of 33 Questions

* Be the First to Post a Comment.

Submit comment :


Captcha Image
Reload

Ask Question

Captcha Image
Reload

Note : Name and Email never shown.





Subscribe


Become a part of EducationForever. Subscribe to our FREE Newsletter