0
Am I doing this right? This particular code corresponds to Spy Life Coding Challenge
https://code.sololearn.com/ckXvp2kTbWJE/?ref=app The built in compiler says my program has some errors in it so, can someone please enlighten me of how should my program work and also a way to allow whitespaces as part of the program as well? Thank you!
1 Answer
0
Marc Stephen Gabres
malloc() function is used for allocation of memory, malloc allocates memory from heap. It doesn't initialise memory with zero program needs null ('\0') character at the end of string data otherwise it will print garbage value at end of the string till null ('\0') character appears while printing using printf() function
DHANANJAY