News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

Array initialisation

Started by Gary Willoughby, January 09, 2010, 02:41:15 AM

Previous topic - Next topic

Gary Willoughby

If i write this code outside of the main function, are the indexes initialised to '\0'?

char source[1000000];

JohnF


Gary Willoughby

Cool! Is this standard behaviour on all C99 compilers?

JohnF

Quote from: Gary Willoughby on January 09, 2010, 05:49:19 PM
Cool! Is this standard behaviour on all C99 compilers?

I believe it is a requirement.

John

Vortex

Hi Gary,

Why not to use a memory allocation function?
Code it... That's all...