3i Infotech Placement: Sample Questions 715 - 716 of 1245
Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.
Question 715
Explanation
Mount
- Mount system call makes a directory accessible by attaching a root directory of one file system to another directory.
- In UNIX directories are represented by a tree structure and mounting attaches them to branches.
- File system found on one device attaches itself to the main file-system tree- location in the system is called a mount point.
Example:
- Mount:- t type device dir
- Mounts the file system found on device “od” to the directory dir.
Unmounts
- Unmount system calls does the opposite.
- Unmounts the attached file from the mounts point.
- A file in use by some process cannot be detached.
Question 716
Write in Short Short Answer▾
Predict the output of the following program code:
main ()
{
fork ();
printf (“Hello World!”);
}
Explanation
- Hello World! Hello World:
- The fork creates a child that is a duplicate of the parent process.
- The child begins from the fork () .
- All the statements after fork () are executed twice (once by the parent and second time by child) .
- The statement before fork () is executed only by the parent process.