int *ip = (int *)malloc(sizeof(int));
a) It is for the syntax correctness
b) It is for the type-casting
c) It is to inform malloc function about the data-type expected
d) None of the mentioned
Why do we write (int *) before malloc?
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Why do we write (int *) before malloc?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!