Horje
initialize array in c with 0 Code Example
initialize array in c with 0
static char ZEROARRAY[1024]; // if declaration is in global scope or is static it will alredy be initialized to Zeroes
// OR
char ZEROARRAY[1024] = {0}; // Compiler fills unwritten entries with zeroes
// OR
memset(ZEROARRAY, 0, 1024); // Alternatively you could use memset to initialize the array at program startup:




C

Related
how to print a file c Code Example how to print a file c Code Example
c pause for 1 second Code Example c pause for 1 second Code Example
strcasecmp c Code Example strcasecmp c Code Example
atoi Code Example atoi Code Example
pointers to a function in c Code Example pointers to a function in c Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9