Write a program which has the following seven functions.
The functions should be:

• main() this calls the other 6 functions
• fget_long() a function which returns a long data
type from a file
• fget_short() a function which returns a short
integer variable from a file
• fget_float() a function which returns a floating
point variable from a file
• fprt_long() a function which prints its single,
long argument into a file
• fprt_short() a function which prints its single,
short argument into a file
• fprt_float() a function which prints its single,
floating point argument into a file.

You should use fscanf() to get the values of the variables
from the input (the file) and fprintf() to print the values
to the other file. Pay attention to using the correct
format for each of the data types.


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C Interview Questions

What is Heap?

3 Answers  


How would you use the functions fseek(), freed(), fwrite() and ftell()?

0 Answers   Aspire, Infogain, TISL,


Explain how are 16- and 32-bit numbers stored?

0 Answers  


The purpose of this exercise is to benchmark file writing and reading speed. This exercise is divided into two parts. a). Write a file character by character such that the total file size becomes approximately >10K. After writing close the file handler, open a new stream and read the file character by character. Record both times. Execute this exercise at least 4 times b). Create a buffer capable of storing 100 characters. Now after generating the characters, first store them in the buffer. Once the buffer is filled up, store all the elements in the file. Repeat the process until the total file size becomes approximately >10K.While reading read a while line, store it in buffer and once buffer gets filled up, display the whole buffer. Repeat the exercise at least 4 times with different size of buffer (50, 100, 150 …). Records the times. c). Do an analysis of the differences in times and submit it in class.

0 Answers  


What is the use of structure padding in c?

0 Answers  






Write a program to print a (*)pattern programming (A to Z) in capital in one programming ?

2 Answers   TCS,


write a program to copy the string using switch case?

0 Answers   Mind Tree,


find the output of the following program main() { int x=5, *p; p=&x; printf("%d",++*p); }

10 Answers   Amdocs, TCS,


Write a program that his output * *** *****

1 Answers  


Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result

0 Answers  


what is the definition of storage classes?

3 Answers   Wipro,


What is hash table in c?

0 Answers  


Categories