Q. What is the correct syntax to allocate memory for an integer using malloc()?

Malloc() का उपयोग करके पूर्णांक के लिए मेमोरी आवंटित करने का सही सिंटैक्स क्या है?

A
int *ptr = malloc(4);
B
int ptr = malloc(sizeof(int));
C
int ptr = (int)malloc(sizeof(int));
D
int malloc(sizeof(int));

Explanation

Explanation will be available soon. Please stay tuned.

व्याख्या जल्द ही उपलब्ध होगी। कृपया बने रहें।

Invest in Future Achievers

Your support helps keep Exam Achiever 100% free for students preparing for exams.

Thanks for your support!

Comments

Leave a Comment