Qualcomm Interview Question
Testing / Quality AssurancesCountry: Israel
Interview Type: In-Person
printf() is implemented in libc (standard library) which use the "write" system call to out the string in stdout or stderr. Inside libc, printf implementation takes variable arguments, and formats the strings using format specifier "%" and finally output the string to stdout or stderr using "Write" system call.
printf() ---> printf() in the C library ---> write() in C library ---> write() system call in kernel.
- Omkar February 04, 2014Following the trail from printf down to the actual OS call(s) can be pretty messy.To understand what is going on at the lowest levels, you will need to analyze the source code in the kernel.