I want to open the input file so that I can use fseek all over. How To?

In one of my logics, I have to use fseek() and for that I need to open the input file. For eg:

FILE *f;
f = fopen("C:/myDocs/inputFile[dot]txt","r");
fseek(f, 80, SEEK_SET)

So here I want the address & name of the input file that are located on CodeChef servers. What are the names of those input files on which our codes are tested?

@raviojha2105 The input in codechef is taken from STDIN and printed out to STDOUT… so if you want to seek 80 character in input then read input from a buffer character by character n continue reading until you reach 80 …
You cannot know the total length of an incoming stream unless you read it all and keep it buffered.

it will be then more prtable because the input files may be of any name… i would suggest you not to be file dependent :slight_smile:


http://www.chemie.fu-berlin.de/chemnet/use/info/libc/libc_7.html You can check this link :slight_smile: