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.


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

Post New Answer

More C Interview Questions

pascal triangle program

2 Answers  


main() { int i,n=010; int sum=0; for(i=1;i<=n;i++) {s=s+i; } printf("%d",&s); getch(); }

6 Answers  


Can you add pointers together? Why would you?

0 Answers  


Reverse the part of the number which is present from position i to j. Print the new number. eg: num=789876 i=2 j=5 778986

1 Answers  


What is function what are the types of function?

0 Answers  






p*=(++q)++*--p when p=q=1 while(q<=6)

0 Answers   KINPOE,


What is non linear data structure in c?

0 Answers  


What is default value of global variable in c?

0 Answers  


Explain the properties of union. What is the size of a union variable

0 Answers  


What is the difference between typeof(foo) and myFoo.GetType()?

2 Answers   Synergy,


Do you know what is the purpose of 'extern' keyword in a function declaration?

0 Answers  


if function is declared as static in one source file, if I would like to use the same function in some other source file...is it possible....how ?

2 Answers   NetApp,


Categories