135
77.9k

190+ Linux Programming Solved MCQs

These multiple-choice questions (MCQs) are designed to enhance your knowledge and understanding in the following areas: Master of Computer Applications (MCA) , Programming Languages .

Chapters

Chapter: Unit 4
151.

Signals can be sent

A. By process itself
B. By one process to another process
C. By the Kernel to a process
D. By (a),(b) and (c)
Answer» D. By (a),(b) and (c)
152.

Similar to read and write system calls

A. Send
B. Recv
C. (a) and (b) both
D. None
Answer» C. (a) and (b) both
153.

NetBIOS is

A. Session Service
B. Datagram service
C. General Commands
D. None
Answer» A. Session Service
154.

UDP stands for

A. User datagram Protocol
B. Uninterrupted data part
C. Uniform data provider
D. None
Answer» A. User datagram Protocol
155.

TCP stands for

A. Transmission Control protocol
B. Transfer Control protocol
C. Termination control protocol
D. None
Answer» A. Transmission Control protocol
156.

How to identify a communication?

A. Source IP Address
B. Source Port Number
C. Destination IP Address
D. All the above
Answer» D. All the above
157.

The physical layer of a network

A. constructs packets of data and sends them across the network
B. controls error detection and correction
C. defines the electrical characteristics of signals passed between the computer and communication devices
D. All of the above
Answer» C. defines the electrical characteristics of signals passed between the computer and communication devices
158.

What TCP/IP protocol is used for remote terminal connection service?

A. UDP
B. RARP
C. FTP
D. TELENET
Answer» D. TELENET
159.

How many networks and nodes per network, are allowed by the Class B network?

A. 127 networks and 16,777,216 nodes per network
B. 16,384 networks and 65,534 nodes per network
C. 2,097,152 networks and 254 nodes per network
D. All of the above
Answer» B. 16,384 networks and 65,534 nodes per network
160.

What service is used to translate domain names to IP addresses?

A. NFS
B. SMB
C. NIS
D. DNS
Answer» D. DNS
161.

What TCP/IP protocol is used for file transfer with minimal capability and minimal overhead?

A. TELNET
B. TFTP
C. FTP
D. RARP
Answer» B. TFTP
162.

What TCP/IP protocol is used for transferring electronic mail messages from one machine to another?

A. FTP
B. SNMP
C. SMTP
D. RPC
Answer» C. SMTP
163.

What can he used to set up a firewall on a Linux system?

A. netstat
B. route
C. trace
D. ipchains
Answer» D. ipchains
164.

What service is not monitored by inetd ?

A. SSH
B. time
C. ntalk
D. finger
Answer» A. SSH
165.

What command do you use to add routes to a Linux router?

A. addroute
B. route
C. netstat
D. net
Answer» B. route
166.

Which of the following is not a communication command?

A. grep
B. mail
C. mesg
D. Write
Answer» A. grep
167.

What protocol(s) is (are) allowed a user to retrieve her/his mail from the mail server to her/his mail reader?

A. POP3
B. FTP
C. MAP
D. All of the above
Answer» A. POP3
168.

The 32-bit internet address 10000000 00001010 00000010 00011110 will be written in dotted decimal notation as

A. 128.10.2.30
B. 210.20.2.64
C. 164.100.9.61
D. 148.20.2.30
Answer» A. 128.10.2.30
169.

Which class network is used for a collection of a small number of networks with a large number of nodes?

A. Class A
B. Class B
C. Class C
D. All of the above
Answer» A. Class A
170.

What type of addressing format is used by Class A network?

A. Net.Net.Net.Node
B. Net.Net.Node.Node
C. Net.Node.Net.Node
D. Net.Node.Node.Node
Answer» D. Net.Node.Node.Node
171.

How many class A, B and C network IDs can exist?

A. 128
B. 126
C. 16,382
D. 2,113,658
Answer» D. 2,113,658
172.

Communication using UDP is usually____________.

A. connectionless,iterative
B. connectionless,concurrent
C. connection-oriented,iterative
D. connection-oriented,concurrent
Answer» A. connectionless,iterative
173.

Communication using TCP is usually____________.

A. connectionless,iterative
B. connectionless,concurrent
C. connection-oriented,iterative
D. connection-oriented,concurrent
Answer» D. connection-oriented,concurrent
174.

SOCK_STREAM sockets are used by ______ processes.

A. UDP
B. TCP
C. SCTP
D. None of these
Answer» B. TCP
175.

SOCK_DGRAM sockets are used by ______ processes.

A. UDP
B. TCP
C. SCTP
D. None of these
Answer» A. UDP
176.

An interface is a set of ___________ designed to facilitate interaction between two entities

A. programs
B. instructions
C. rules
D. none of these
Answer» B. instructions
177.

How many types of sockets are there?

A. 2
B. 3
C. 4
D. 5
Answer» C. 4
178.

If a signal is received by a process, when will it be processed?

A. It is processed immediately
B. It is processed when process is switching to kernel mode
C. It is processed in the next time slice given to the process
D. all
Answer» B. It is processed when process is switching to kernel mode
179.

Which signal is generated when we press control-C?

A. SIGINT
B. SIGTERM
C. SIGKILL
D. SIGSEGV
Answer» A. SIGINT
180.

Which signal is generated when we press ctrl-Z?

A. SIGKILL
B. SIGSTOP
C. SIGABRT
D. SIGINT
Answer» D. SIGINT
181.

Which signal is sent when the Child process terminates?

A. SIGINIT
B. SIGKILL
C. SIGSTOP
D. SIGCHLD
Answer» B. SIGKILL
182.

Which of the following signal cannot be handled or ignored?

A. SIGINT
B. SIGCHLD
C. SIGKILL
D. SIGALRM
Answer» C. SIGKILL
183.

Another signal that cannot be caught is:

A. SIGPIPE
B. SIGHUP
C. SIGSTOP
D. SIGUSR1
Answer» C. SIGSTOP
184.

When real interval timer expires which signal is generated?

A. SIGINT
B. SIGCHLD
C. SIGKILL
D. SIGALRM
Answer» D. SIGALRM
185.

Signals are handled using which system call?

A. kill
B. signal
C. both
D. none
Answer» B. signal
186.

Default action of SIGSEGV is

A. Terminate
B. Core dump
C. Stop
D. Cont
Answer» B. Core dump
187.

The kill system call is used to

A. Send shutdown messages to all by super-user
B. Send a signal to a process
C. Kill processes
D. Stop the processes
Answer» B. Send a signal to a process
188.

Which is true regarding pipes?

A. half duplex
B. full duplex
C. message boundaries are preserved
D. Unordered data
Answer» A. half duplex
189.

The persistancy of a FIFO is

A. process
B. kernel
C. file system
D. none
Answer» C. file system
190.

Advantage of FIFO over pipe is

A. related processes can communicate
B. unrelated processes can communicate
C. none
D. all
Answer» B. unrelated processes can communicate
191.

What mkfifo() creats?

A. pipe
B. unnamed pipe
C. named pipe
D. msg queue
Answer» C. named pipe
192.

System V IPC common attributes are

A. key
B. id
C. owner
D. all the above
Answer» D. all the above
193.

Which one of the following is not system V IPC ?

A. Shared Memory
B. Semaphores
C. FIFO
D. Message Queues
Answer» C. FIFO
194.

Which system call is used to create Sys V message Queue ?

A. msgget
B. shemget
C. semget
D. msgctl
Answer» A. msgget
195.

Which is not the correct option for removing a message queue ?

A. ipcrm -Q
B. ipcrm -q
C. ipcrm -m
D. None
Answer» C. ipcrm -m
196.

Message queues are created in

A. userspace
B. kernelspace
C. both
D. none
Answer» B. kernelspace

Done Studing? Take A Test.

Great job completing your study session! Now it's time to put your knowledge to the test. Challenge yourself, see how much you've learned, and identify areas for improvement. Don’t worry, this is all part of the journey to mastery. Ready for the next step? Take a quiz to solidify what you've just studied.