Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.
main() { int *iptr1; int *iptr2; int *iptr3; iptr1 = malloc(100); iptr2 = iptr1; free(iptr1); iptr2[0] = 5; iptr3 = malloc(400); iptr3 = malloc(10); }...
Implement (simulate), the lock and keys solution. As a guideline, you should:• Read “m.c” (supplied C file), and retrieve the appropriate tokens then place them into a file called TOKENS.txt as token value pairs on each line of the file.• Read TOKENS.txt and extract:a. Declaration such as Identifier iptr1 and Identifier iptr3 andb. Assignment such as Operator = Identifier iptr2,c. Heap freeing statement such as Keyword free Separator (Identifier iptr3.d. Dereferencing such as Operator Identifer = valueOnce your program is run on the input program “m.c”, it should report on whether there is:• Dangling pointer or• Memory leak possibility