#include <stdio.h>
#include <string.h>
int main(void) {
char rez[100] = "\0";
char t = 97;
char temp;
strcpy(temp, t);
strcat(rez, temp);
printf("%s", rez);
return 0;
}
I want to join the character 'a' to the result but strcpy and strcat command do not work. How could I do that if the char t should be an ASCII code?
warning: passing argument 1 of 'strcpy' makes pointer from integer without a cast [-Wint-conversion] strcpy(temp,t); note: expected 'char * restrict' but argument is of type 'char' char * __cdecl strcpy(char * restrict _Dest,const char * restrict _Source);