getting runtime error SIGTSTP on codechef, can't find whats wrong, when i compile and this code on my system it work upto for loop after that it stuck. this is my code
#include <stdio.h>
struct invent
{
char *name[20];
int number;
float price;
};
int main()
{
struct invent product[3], *ptr;
printf("input\n\n");
for(ptr = product; ptr < product+3; ptr++)
scanf("%s %d %f", ptr->name, &ptr->number, &ptr->price);
printf("\nOutput\n\n");
for(ptr = product;ptr < product + 3; ptr++)
{
printf("%-20s %5d %10.2f\n", ptr->name, ptr->number, ptr->price);
}
return(0);
}