JNTU

JNTU MCA 2018 LINUX PROGRAMMING Previous Question Paper (June/July - 2018 - R13)

MCA | 2018 | III | R13 | June/July - 2018

Answer PaperPaper Code: 813AMMaximum Marks: 60Time: 3 Hours

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

Part A

120 marks
a

Explain command substitution.

4 marks

Answer

Command substitution allows the output of a command to be replaced in the place where the command is executed. It is performed by enclosing the command within backticks (`) or by using the $(command) syntax. When the shell encounters this, it executes the command in a subshell and replaces the entire expression with the standard output of that command, removing any trailing newlines.

b

Explain the functionality of lseek() function.

4 marks

Answer

The lseek() function is used to reposition the read/write file offset of an open file descriptor. Its syntax is

off_t lseek(int fd, off_t offset, int whence);
. The whence argument determines the starting position: SEEK_SET (beginning of file), SEEK_CUR (current position), or SEEK_END (end of file). It returns the resulting offset location as measured in bytes from the beginning of the file.

c

What is the difference between wait() and waitpid().

4 marks

Answer

Sign in to view the complete answer paper.

d

With the help of syntax explain popen() function.

4 marks

Answer

Sign in to view the complete answer paper.

e

Explain how to perform IPC between processes over a network.

4 marks

Answer

Sign in to view the complete answer paper.

Part B

28 marks
a

Explain various process utilities available in linux.

4 marks

Answer

Sign in to view the complete answer paper.

b

Write a shell script that deletes all lines containing a specified word in one or more files supplied as arguments to it.

4 marks

Answer

Sign in to view the complete answer paper.

OR
38 marks
a

Develop an AWK program to summarize from the list of all processes, a count of processes run by every user (including root).

4 marks

Answer

Sign in to view the complete answer paper.

b

Write about text processing utilities.

4 marks

Answer

Sign in to view the complete answer paper.

4

Differentiate between the following terms:

a) getc( ) Vs fgetc( ) b) stat( ) Vs fsat( ) c) printf( ) Vs fprint( ) d) scanf( ) Vs fscanf( ).

8 marks

Answer

Sign in to view the complete answer paper.

OR
5

Explain the file and record locking techniques with relevant example code snippet?

8 marks

Answer

Sign in to view the complete answer paper.

68 marks
a

Explain the layout of a C program image in main memory.

4 marks

Answer

Sign in to view the complete answer paper.

b

Define orphan process. Write a program to illustrate the orphan process concept.

4 marks

Answer

Sign in to view the complete answer paper.

OR
7

Write a c program that accepts two small numbers as arguments and then sums the two numbers in a child process. The sum should be returned by child to the parent as its exit status and the parent should print the sum?

8 marks

Answer

Sign in to view the complete answer paper.

8

Describe the API provided by linux for semaphores.

8 marks

Answer

Sign in to view the complete answer paper.

OR
9

Write a program and explain how to transfer a large amount of data between two processes using Message queues?

8 marks

Answer

Sign in to view the complete answer paper.

10

Describe Socket system calls used for connectionless protocol with syntax and usage.

8 marks

Answer

Sign in to view the complete answer paper.

OR
11

Explain with a program how to copy file data from server to client using shared memory?

8 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the question paper of LINUX PROGRAMMING from JNTU for MCA 2018 III, June/July - 2018, R13.

For the solved question paper with answers, switch to the Answer Paper tab.

Other papers in LINUX PROGRAMMING

Loading Question Papers

Fetching data from database...