Question
Standard C library functions will always invoke a system
call when executed from a single-threaded process in a UNIX/Linux operating system?Solution
exit C library functions - Terminates the process normally, performing the regular cleanup for terminating programs. malloc - This is a function defined in standard C library and it does not always invoke the system call. When a process is created, certain amount of heap memory is already allocated to it, when required to expand or shrink that memory, it internally uses sbrk/brk system call on Unix/Linux. sleep - This is not even standard C library function, it is a POSIX standard c library function which always invokes the system call.
The average age of 15 children and their teacher's age are 12 years. If the teacher's age is excluded, the average reduces by 2. What is the teacher's age?
The average of three numbers P, Q and R is 1600. R is 75% more than P. The ratio of P and Q is 4:5 respectively. If R is 25% less than S, then find out ...
The average number of books on history, polity and geography in a library is 140, and the average number of books on history and geography is 150. If th...
The average of a set of s numbers is 18. If 30 is added to the set, then the average of the set becomes 18.3. Find the value of 5 X (s - 15).
The average of two numbers is 6 more than the smaller number among them. If the greater number is 66.67% more than the smaller number, then find the sum...
In an office, there are 52 employees with an average weight of 38 kg. When the office manager's weight is included, the average w...
Average marks scored by Vineet in five subjects are 75. The average marks scored by him (excluding his highest and lowest marks) are 60 and lowest marks...
Fifteen numbers have an average of 70. The average of the first seven is 60, and the average of the last five is 63. The eighth number is 50% of the ni...
- During a week, the first six days recorded an average rainfall of 140 cm, and the last six days had an average of 148 cm. Given that the weekly average was...
The average score obtained by 23 students in a class test is 68 marks. The top place was shared by 3 people who got the same score. If the lowest score ...