SyntaxFix
Write A Post
Hire A Developer
Questions
You can use strncat()
#include <stdio.h> #include <string.h> int main(void){ char hi[6]; char ch = '!'; strcpy(hi, "hello"); strncat(hi, &ch, 1); printf("%s\n", hi); }