Search:

Type: Posts; User: chimken

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    1,687

    program prints extra zero at the end

    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>

    ...
  2. Replies
    3
    Views
    5,390

    Sorry for the late reply, I was confused on how...

    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>...
  3. Replies
    3
    Views
    5,390

    make a polynomial from file (linked lists)

    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...
Results 1 to 3 of 3