My school assignment states the following i need to create a typedef struct with 2 data type's (Char,Int) ,create 4 elements for it, put these values into an array and print the array. i can manage it up to the point of creating the array. After that it gets a bit fussy for me,
#include <stdio.h>
typedef struct {
char *Series;
char KiloWatts;
int Age;
} Data_T;
int main(){
Data_T Motor[4] = {{"B", 3, 2004},{"T", 5, 2005},{"B", 3, 2004},{"A", 2, 2002}};
int i;
for (i=0; i<4;i++)
printf("%n", Motor[i]);
}
return 0;
}
I know that the printf right now is not working so is there a function to do this or do i need to write down everything manually?