Here's my code:
#define MAX 50
#define POWERS 7
main()
{
char input[MAX];
Term values[POWERS+1], temp;
int loc=0, i=0, j, k, best;
FILE* fp;
printf("test before");
scanf("%s",input);
printf("test after");
...
The program compiles, but I get a segmentation fault error on runtime
the test print before the input scan appears before the error, but the one after doesn't
it doesn't appear to be the syntax
#define MAX 50
#define POWERS 7
main()
{
char input[MAX];
Term values[POWERS+1], temp;
int loc=0, i=0, j, k, best;
FILE* fp;
printf("test before");
scanf("%s",input);
printf("test after");
...
The program compiles, but I get a segmentation fault error on runtime
the test print before the input scan appears before the error, but the one after doesn't
it doesn't appear to be the syntax


Comment