~cpp #include <stdio.h> #include <string.h> void main(){ char x[20] = "I love computer"; char y[20] = " You love computer"; char z[40]; FILE *fp; strcpy(z, x); strcat(z, y); fp = fopen("result.out", "w"); fprintf(fp, "x => "); fprintf(fp, x); fprintf(fp, "\ny => "); fprintf(fp, y); fprintf(fp, "\nz => "); fprintf(fp, z); }
~cpp x => I love computer y => You love computer z => I love computer You love computer