On continuing to be unfair

Okay, now it’s been brought to my attention that I could’ve made that code even simpler by not using dynamically allocated strings.

char[16] Noun;
char[16] Adjective;
char[16] Compliment;
unsigned int bufSize=16;

strcpy(Noun, "dog");
strcpy(Adjective, "good");

_snprintf(Compliment, bufSize, "%s %s", Adjective, Noun);

<3.

Tags:

Leave a Reply

You must be logged in to post a comment.