#include<stdio.h> #include<stdlib.h> #include<unistd.h> #include<string.h> void main( ) { FILE * fp; char name[300],city[300],dept[300]; /* fp=fopen("sampledata.ods", "r");*/ if(!fp) { printf("File to open!\n"); exit(1); } fscanf(fp,"%s%s%s",&name,&city,&dept); fp=fopen("sampledata.ods","r"); fclose(fp); fprintf(stdout,"First Line is %s%s%s\n", name, city, dept); return 0; }
.ods
XML
fscanf
FILE *fp = fopen(fileName, mode);
zipped
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)