Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite+ 1
Here after n=n+1 does realloc allocates size of n+1 only or n+n+1?
2 Réponses
+ 1
thanks
0
n=n+1 will change n to n+1 only. So realloc will change the final size of a to n+1.
You may verify the same by printing :
sizeof(a)/sizeof(a[0]);