JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD MCA 2019 LINUX PROGRAMMING Previous Question Paper (December - 2019 - R17)

MCA | 2019 | IV | R17 | December - 2019

Answer PaperPaper Code: 844ABMaximum Marks: 75Time: 3hrs

Note: This question paper contains two parts A and B. Part A is compulsory which carries 25 marks. Answer all questions in Part A. Part B consists of 5 Units. Answer any one full question from each unit. Each question carries 10 marks and may have a, b, c as sub questions.

Part A

125 marks
a

Explain about the interrupt processing in shell script.

5 marks

Answer

Interrupt processing in shell scripts is handled using the trap command. It allows a script to catch signals sent by the kernel or user (like SIGINT from Ctrl+C or SIGTERM) and execute a specified command or function instead of terminating immediately. The syntax is

trap 'command' signal_list
. This is essential for performing cleanup tasks, such as removing temporary files or resetting terminal settings, before the script exits.

b

Write and explain the syntax of fflush and fseek with an example.

5 marks

Answer

fflush(FILE *stream) clears the output buffer of a stream. It is used to ensure that data written to a file or standard output is physically flushed to the destination immediately. If the stream is NULL, it flushes all open output streams.

fseek(FILE *stream, long offset, int whence) sets the file position indicator for a stream. The whence argument determines the starting point: SEEK_SET (beginning), SEEK_CUR (current position), or SEEK_END (end of file). Example:

FILE *fp = fopen("test.txt", "w+");
fputs("Hello World", fp);
fflush(fp);
fseek(fp, 0, SEEK_SET);

c

Explain about the Zombie process.

5 marks

Answer

Sign in to view the complete answer paper.

d

What is Inter Process Communication? Explain the IPC methods supported by the Linux.

5 marks

Answer

Sign in to view the complete answer paper.

e

Write a program to illustrate read process from shared memory (read data from shared memory and writing to the standard output).

5 marks

Answer

Sign in to view the complete answer paper.

Part B

210 marks
a

Write a shell script to find the factorial of a given number.

5 marks

Answer

Sign in to view the complete answer paper.

b

Explain about the characteristics of shell.

5 marks

Answer

Sign in to view the complete answer paper.

OR
310 marks
a

Explain about the control structures are used in shell programming.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write a shell script to sort a given list of numbers in ascending order.

5 marks

Answer

Sign in to view the complete answer paper.

410 marks
a

Explain the various file types in a UNIX system.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write a program to display the number of lines, words and characters in a file.

5 marks

Answer

Sign in to view the complete answer paper.

OR
510 marks
a

Explain about the file descriptors.

5 marks

Answer

Sign in to view the complete answer paper.

b

Explain the different types of operators are used in Perl.

5 marks

Answer

Sign in to view the complete answer paper.

610 marks
a

Write and explain the syntax of the following functions i) kill ii) raise

5 marks

Answer

Sign in to view the complete answer paper.

b

Write the syntax of six versions of exec functions and also explain how these functions differ from each other.

5 marks

Answer

Sign in to view the complete answer paper.

OR
7

What is process? Explain how a process can be created and terminated in Linux operating system.

10 marks

Answer

Sign in to view the complete answer paper.

8

What are pipes? Explain their limitations. Explain how pipes are created and used in IPC with an example programs.

10 marks

Answer

Sign in to view the complete answer paper.

OR
9

Write a program to transfer a large amount of data between two processes using message queues.

10 marks

Answer

Sign in to view the complete answer paper.

1010 marks
a

Write a program to illustrate file locking using semaphores.

5 marks

Answer

Sign in to view the complete answer paper.

b

Explain about the unix kernel support for semaphores.

5 marks

Answer

Sign in to view the complete answer paper.

OR
1110 marks
a

Explain the socket system calls for connectionless protocol.

5 marks

Answer

Sign in to view the complete answer paper.

b

Explain in detail the Linux API for shared memory.

5 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the solved question paper with answers of LINUX PROGRAMMING from JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD for MCA 2019 IV, December - 2019, R17.

For the question paper without answers, switch to the Question Paper tab.

Other papers in LINUX PROGRAMMING

Loading Question Papers

Fetching data from database...