JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD MCA 2022 LINUX PROGRAMMING Previous Question Paper (September/October - 2022 - R17)

MCA | 2022 | IV | R17 | September/October - 2022

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

Answer any five questions

All questions carry equal marks

Main

115 marks
a

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

8 marks

Answer

To calculate the factorial of a number in a shell script, we can use a loop to multiply the sequence of integers from 1 to the input number.

#!/bin/bash
echo "Enter a number:"
read num
fact=1
for (( i=1; i<=num; i++ ))
do
  fact=$((fact * i))
done
echo "Factorial of $num is $fact"
b

Explain about the input redirection and output redirection in shell script.

7 marks

Answer

Input and output redirection allow a shell to change the source of input and the destination of output for commands, moving away from the default standard input (keyboard) and standard output (screen).

Output Redirection: This uses the > operator to overwrite a file with the output of a command, or the >> operator to append output to an existing file. For example, ls > files.txt saves the list of files into files.txt.

Input Redirection: This uses the < operator to take input from a file instead of the keyboard. For example, sort < data.txt reads the contents of data.txt and sorts them.

Additionally, Error Redirection (using 2>) allows capturing error messages separately from standard output, which is useful for logging purposes.

215 marks
a

Write a shell script to find out whether a given year is a leap year or not.

8 marks

Answer

Sign in to view the complete answer paper.

b

Explain the process of debugging in shell script.

7 marks

Answer

Sign in to view the complete answer paper.

315 marks
a

Explain the assignment statements used in perl programming.

8 marks

Answer

Sign in to view the complete answer paper.

b

Write a program to delete duplicate lines in a file and display the count of lines.

7 marks

Answer

Sign in to view the complete answer paper.

415 marks
a

Explain about the standard I/O functions used in Linux.

8 marks

Answer

Sign in to view the complete answer paper.

b

How to find the greatest number given in the array by using perl programming?

7 marks

Answer

Sign in to view the complete answer paper.

515 marks
a

Distinguish between reliable and unreliable signals.

9 marks

Answer

Sign in to view the complete answer paper.

b

Explain about the process control.

6 marks

Answer

Sign in to view the complete answer paper.

615 marks
a

Explain about the process attributes in Linux.

6 marks

Answer

Sign in to view the complete answer paper.

b

Explain about the signal generation and handling.

9 marks

Answer

Sign in to view the complete answer paper.

715 marks
a

Explain about the IPC between processes on different systems.

8 marks

Answer

Sign in to view the complete answer paper.

b

Write a Client program to implement the interprocess communication with system V message queues.

7 marks

Answer

Sign in to view the complete answer paper.

815 marks
a

Explain about the file locking with semaphore.

8 marks

Answer

Sign in to view the complete answer paper.

b

Explain about the unix kernel support for shared memory.

7 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 2022 IV, September/October - 2022, 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...