Garbage printed with string after strcpy
Advertisements I am a beginner in C and I am trying to copy a string inside another one. I have the following code: #include <stdio.h> #include <string.h> typedef struct { float mort_2009, mort_2015, indices; char estado[]; } Mortalidade; void defineEstados ( Mortalidade *e, char estado[], float mort_2009, float mort_2015, int posix) { strcpy(e[posix].estado, estado); e[posix].mort_2009… Read More Garbage printed with string after strcpy