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

Describe explain how arrays can be passed to a user defined function

0 Answers  


What are the 4 data types?

0 Answers  


int main() { int x = (2,3,4); int y = 9,10,11; printf("%d %d",x,y); } what would be the output?

7 Answers   Parimal, Wipro,


What is calloc() function?

0 Answers  


write an algorithm and c program to add two 2x2 matrics

2 Answers  






plssssss help !!....using array.. turbo c.. create a program that will accept number of words to be consored. .a word must not exceed 10 characters long .the text to be entered will be no longer than 200 characters .there will be no 10 words example: enter number of words to be censor: 5 enter words to censor: windows office microsoft bill gates enter text to censor: bill gates founded microsoft and makes office and windows sample output: <consored> <censored> founded <censored> and makes <censored> and <censored>

1 Answers  


wtite a program that will multiply two integers in recursion function

4 Answers   TCS,


int array[]={1,2,3,4,5,6,7,8}; #define SIZE (sizeof(array)/sizeof(int)) main() { if(-1<=SIZE) printf("1"); else printf("2"); }

2 Answers   Vector,


 write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare.  You will then tabulate this information in another file.

0 Answers  


i want to asked a question about c program the question is: create a c program that displays all prime numbers less than 500? using looping statement

5 Answers  


What is the difference between local variable and global variable in c?

0 Answers  


Is an array parameter is always "by reference" ?

1 Answers  


Categories