Question 8: If "ptr" is a pointer to memory allocated through malloc, then what does...
Juniper Networks technical mcq question, verified with a worked answer. Free to practise - no sign-up.
If "ptr" is a pointer to memory allocated through malloc, then what does realloc(ptr, 0) do?
If "ptr" is a pointer to memory allocated through malloc, then what does realloc(ptr, 0) do?
Pick ONE option
Show answer & explanation
Answer: A. A) allocate memory of size 0
Accurate technical and quantitative evaluation based on foundational principles.
Step-by-step Derivation:
Step 1: Formulate problem conditions.
Step 2: Apply logical deduction.
Step 3: Conclude correct option.