NetApp Interview Question
Software Engineer / DevelopersWhat does the interviewer want to know is not clear. Could the guy who posted the question please throw some light on it.
Infact, if it is as simple i would say by reading one character at a time. Since in text file every character takes one byte and if dealing with Binary then by reading 8 bits. Am i missing something ?
Well you could start of with saying that the getchar() function will call the library function which would call the system call.
- abhimanipal March 10, 2010The kernel looks into the system call table to see the location of the appropriate system call. The implementation will then get the appropriate character.
Most system calls return either success or failure of the call. Hence to return the value of the character there is some special structure in the implementation. The value of this structure is then returned to the library function and consequently comes as the result of your get char