Apr 12, 2002 #2 Zyrenthian Programmer Mar 30, 2001 1,440 US couple of options. if you have a buffer that can fit the new character char buffer[128]; strcpy(buffer,"HELLO WORLD" you could just do char newCharacter = '!'; buffer[strlen(buffer)] = newCharacter; buffer[strlen(buffer)] = 0; // REQUIRED or you could do char Hello[] = "hello world"; char buffer[128]; sprintf(buffer,"%s%c",Hello,'!'); Just a couple of ways... there are many. Matt Upvote 0 Downvote
couple of options. if you have a buffer that can fit the new character char buffer[128]; strcpy(buffer,"HELLO WORLD" you could just do char newCharacter = '!'; buffer[strlen(buffer)] = newCharacter; buffer[strlen(buffer)] = 0; // REQUIRED or you could do char Hello[] = "hello world"; char buffer[128]; sprintf(buffer,"%s%c",Hello,'!'); Just a couple of ways... there are many. Matt