c concatenate strings
char str[80];
strcpy(str, "these ");
strcat(str, "strings ");
strcat(str, "are ");
strcat(str, "concatenated.");
c concatenate strings
char str[80];
strcpy(str, "these ");
strcat(str, "strings ");
strcat(str, "are ");
strcat(str, "concatenated.");
how compress string in c
char* StrCompress(char myStr[])
{
char *s, *in;
for (s = myStr, in = myStr; *s; s++) {
int count = 1;
in[0] = s[0]; in++;
while (s[0] == s[1]) {
count++;
s++;
}
if (count > 1) {
int len = sprintf(in, "%d", count);
in += len;
}
}
in[0] = 0;
return myStr;
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us