I want to copy the string “Best School” into a new space in memory, which of these statements can I use to reserve enough space for it
A. malloc(sizeof(“Best School”))
B. malloc(strlen(“Best School”))
C. malloc(11)
D. malloc(12)
E. malloc(sizeof(“Best School”) + 1)
F. malloc(strlen(“Best School”) + 1)
I am still very new to C programming language so I really am not too sure of which works well. But I will love for someone to show me which ones can be used and why they should be used.
Thank you.