my program prints an extra zero in the end, and I tried removing the malloc in main and allocate inside the function but it just produces a segfault
#include<stdio.h>
#include<stdlib.h>
...
Type: Posts; User: chimken
my program prints an extra zero in the end, and I tried removing the malloc in main and allocate inside the function but it just produces a segfault
#include<stdio.h>
#include<stdlib.h>
...
Sorry for the late reply, I was confused on how fscanf reads integers from files(the file is required) so i changed my code to be more flexible but now it produces segfault
#include<stdio.h>...
im confused as to how to read a file line by line and store them in a linked list say:
2 //2 cases- addition or expansion
1 //case 1- addition
4 //1st polynomial = 4 terms
2 3 //2x^3
4 6
1 0...