Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

33 lines (29 sloc) 0.457 kb
#include <stdio.h>
#include <stdlib.h>
int read(char *file)
{
FILE *input;
input = fopen(file,"r");
if(input == NULL)
{
printf ("Cannot open file\n");
exit(1);
}
else
{
printf("Open file success\n");
}
while(!feof(input))
{
int temp = 0;
fscanf(input,"%d",&temp);
printf("%d\n",temp);
}
fclose(input);
return 0;
}
int main(int argc, char* argv[])
{
read(argv[1]);
return 0;
}
Jump to Line
Something went wrong with that request. Please try again.