JNTU
JNTU MCA 2018 LINUX PROGRAMMING Previous Question Paper (June/July - 2018 - R13)
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
Explain command substitution.
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.
Explain the functionality of lseek() function.
Answer
The lseek() function is used to reposition the read/write file offset of an open file descriptor. Its syntax is
What is the difference between wait() and waitpid().
Answer
Sign in to view the complete answer paper.
With the help of syntax explain popen() function.
Answer
Sign in to view the complete answer paper.
Explain how to perform IPC between processes over a network.
Answer
Sign in to view the complete answer paper.
Part B
Explain various process utilities available in linux.
Answer
Sign in to view the complete answer paper.
Write a shell script that deletes all lines containing a specified word in one or more files supplied as arguments to it.
Answer
Sign in to view the complete answer paper.
Develop an AWK program to summarize from the list of all processes, a count of processes run by every user (including root).
Answer
Sign in to view the complete answer paper.
Write about text processing utilities.
Answer
Sign in to view the complete answer paper.
Differentiate between the following terms:
a) getc( ) Vs fgetc( ) b) stat( ) Vs fsat( ) c) printf( ) Vs fprint( ) d) scanf( ) Vs fscanf( ).
Answer
Sign in to view the complete answer paper.
Explain the file and record locking techniques with relevant example code snippet?
Answer
Sign in to view the complete answer paper.
Explain the layout of a C program image in main memory.
Answer
Sign in to view the complete answer paper.
Define orphan process. Write a program to illustrate the orphan process concept.
Answer
Sign in to view the complete answer paper.
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?
Answer
Sign in to view the complete answer paper.
Describe the API provided by linux for semaphores.
Answer
Sign in to view the complete answer paper.
Write a program and explain how to transfer a large amount of data between two processes using Message queues?
Answer
Sign in to view the complete answer paper.
Describe Socket system calls used for connectionless protocol with syntax and usage.
Answer
Sign in to view the complete answer paper.
Explain with a program how to copy file data from server to client using shared memory?
Answer
Sign in to view the complete answer paper.