Home / MCQ Bank / Computer
Computer File Input Output Difficulty: Medium

Which of the following should be used for freeing the memory allocated in the following C code? #include <stdio.h> struct p { struct p *next; int x; }; int main() { struct p *p1 = (struct p*)malloc(sizeof(struct p)); p1->x = 1; p1->next = (struct p*)malloc(sizeof(struct p)); return 0; }

Select the correct option to test your answer:

More Computer Questions

In Access press to Move to the previous page of the wizard What is the process of wrapping data and functions into a single unit called in C++? What is the time complexity of level order traversal? To open disk, mouse pointer is placed on disk icon and then What is the time complexity of for achieving competitive ratio by tango tree?