Google Interview Report
- 0of 2 votes
Given API:- jiangok2006 July 26, 2012 in United States
int Read4096(char* buf);
It reads data from a file and records the position so that the next time when it is called it read the next 4k chars (or the rest of the file, whichever is smaller) from the file.
The return is the number of chars read.
Todo: Use above API to Implement API
"int Read(char* buf, int n)" which reads any number of chars from the file.
| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Coding
Open Chat in New Window