1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- /*
- * Copyright (C) 2020, 2019, 2018, 2017 Girish M
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- */
- /*
- Problem statement: https://www.isical.ac.in/~pdslab/2017/exams/labtest1.pdf
- */
- #include "common.h"
- int main(int argc, char* argv[])
- {
- /*static int *poly1, *poly2;*/
- if(argc == 2)
- {
- /*FILE* fptr;
- size_t len, read;
- char* line = NULL;
- char* delim = " ";
- unsigned int no_terms[2];
- unsigned int i = 0;
- if(fptr = fopen(argv[1], "r"))
- {
- while((read = getline(&line, len, fptr)) != -1)
- {
- no_terms[i] = strtok(line, delim);
- poly1 = (int*) malloc(sizeof(int)*no_terms);
- while(no_terms1 != 0)
- {
- getline(&line, len, fptr);
- coeff = strtok(NULL, delim);
- pow = strtok(NULL, delim);
- }
- i++;
- }
- }
- else
- printf("\nError opening file\n");*/
- }
- else
- printf("\nUsage ./cs1713-test1-prog3.o file.txt\n");
- return 0;
- }
|