How can I add \'.\' to the char Array := \"Hello World\" in C, so I get a char Array: \"Hello World.\" The Question seems simple but I\'m struggling.
Tried the follo
Suggest replacing this:
char str[1024]; char tmp = '.'; strcat(str, tmp);
with this:
char str[1024] = {'\0'}; // set array to initial all NUL bytes char tmp[] = "."; // create a string for the call to strcat() strcat(str, tmp); //