2081 10

C Programming20815 marksFile handling and file operations

Write a program to write N numbers in file "number.txt" and then read it and display only even numbers.

Write a program to write N numbers in file "number.txt" and then read it and display only even numbers. [5]

--- --- Step Operation Function Used -------------------------------- 1 Open file for writing fopen("number.txt", "w") 2 Write numbers to file fprintf(fp, "%d\n", num) 3 Close file after writing fclose(fp) 4 Open file for reading fopen("number.txt", "r") 5 Read numbers from file fscanf(fp, "%d", ...

Up nextWhat is constant? Explain basic data types in C programming along with their range. [1+4]