Unable to write programs on files.
I am unable to write c programs on files.can anyone give suggestions on it.
What exactly are your problems? You should provide my details. As for the general view, in C it works like this. You open a FILE object using fopen(), read/write to it using fread() and fwrite(), move in them using fseek() and close it using fclose() -- pretty intuitive if you ask me. The standard library also provides convinience functions wrapped around fread() and fwrite() (fprintf(), fputc(), fscanf(), fgetc() etc) to allow you to easily get data from, and put data to, a file.
Problem Statement Given two integers a and b, your task is to calculate and print the following four values:
Please help, any idea?