人気の面接質問と回答・オンラインテスト
面接対策、オンラインテスト、チュートリアル、ライブ練習のための学習プラットフォーム

集中型学習パス、模擬テスト、面接向けコンテンツでスキルを伸ばしましょう。

WithoutBook は、分野別の面接質問、オンライン練習テスト、チュートリアル、比較ガイドをひとつのレスポンシブな学習空間にまとめています。

面接準備

模擬試験

ホームページに設定

このページをブックマーク

メールアドレスを登録

Unix 面接の質問と回答

関連する比較

Linux vs Unix

質問 36. Predict the output of the following program code</P><!--webbot bot="Include" U-Include="../_private/tbl_gglapck.htm" TAG="BODY" startspan --><!--webbot bot="Include" i-checksum="224" endspan --><P class="answers">main()
{
fork();
printf("Hello World!");
}

Hello World!Hello World!
Explanation:
The fork creates a child that is a duplicate of the parent process. The child begins from the fork().All the statements after the call to fork() will be executed twice.(once by the parent process and other by child). The statement before fork() is executed only by the parent process.

役に立ちましたか? コメントを追加 コメントを見る
 

質問 37. Predict the output of the following program code
main()
{
fork(); fork(); fork();
printf("Hello World!");
}

"Hello World" will be printed 8 times.
Explanation:
2^n times where n is the number of calls to fork()

役に立ちましたか? コメントを追加 コメントを見る
 

質問 38. List the system calls used for process management:

System calls Description
fork() To create a new process
exec() To execute a new program in a process
wait() To wait until a created process completes its execution
exit() To exit from a process execution
getpid() To get a process identifier of the current process
getppid() To get parent process identifier
nice() To bias the existing priority of a process
brk() To increase/decrease the data segment size of a process

役に立ちましたか? コメントを追加 コメントを見る
 

質問 39. How can you get/set an environment variable from a program?:

Getting the value of an environment variable is done by using `getenv()'. Setting the value of an environment variable is done by using `putenv()'.

役に立ちましたか? コメントを追加 コメントを見る
 

質問 40. How can a parent and child process communicate?

A parent and child can communicate through any of the normal inter-process communication schemes (pipes, sockets, message queues, shared memory), but also have some special ways to communicate that take advantage of their relationship as a parent and child. One of the most obvious is that the parent can get the exit status of the child.

役に立ちましたか? コメントを追加 コメントを見る
 
{
fork();
printf("Hello World!");
}
2) Predict the output of the following program code
main()
{
fork(); fork(); fork();
printf("Hello World!");
}

3) List the system calls used for process management: 4) How can you get/set an environment variable from a program?: 5) How can a parent and child process communicate? " />

ユーザー評価で最も役立つ内容:

著作権 © 2026、WithoutBook。