JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech I COMPUTER PROGRAMMING IN C Previous Question Paper (May - 2018 - R16)

B.Tech | I | I-I | R16 | May - 2018

Answer PaperPaper Code: 131ADMaximum Marks: 75Time: 3 hours

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.

Part A

125 marks
a

Which statement is multi way selection statement? Why?

2 marks

Answer

The switch statement is the multi-way selection statement. It is used because it allows a program to select one execution path from several alternatives based on the value of a single expression, which is more efficient and readable than using multiple nested if-else statements.

b

What is meant by time sharing environment?

3 marks

Answer

A time-sharing environment is a computing system where multiple users can access the CPU simultaneously. The operating system allocates small time slices to each user or process in a round-robin fashion, creating the illusion that each user has exclusive access to the computer.

c

Evaluate the value of the following when x=3.45

floor( x* 100 + 0.5) / 100
2 marks

Answer

Sign in to view the complete answer paper.

d

Can an assignment operator copy one array to another? Justify your answer.

3 marks

Answer

Sign in to view the complete answer paper.

e

Give the picture to show the memory configuration for the declaration int (*a)[5];

2 marks

Answer

Sign in to view the complete answer paper.

f

Differentiate between strspn and strcspn.

3 marks

Answer

Sign in to view the complete answer paper.

g

What is the need of typedef command?

2 marks

Answer

Sign in to view the complete answer paper.

h

Is macro an inline function? Justify your answer.

3 marks

Answer

Sign in to view the complete answer paper.

i

Contrast text files and binary files.

2 marks

Answer

Sign in to view the complete answer paper.

j

What is a system created stream? Give examples.

3 marks

Answer

Sign in to view the complete answer paper.

Part B

210 marks
a

Write an algorithm to find LCM of two numbers.

5 marks

Answer

Sign in to view the complete answer paper.

b

Describe the process of program development.

5 marks

Answer

Sign in to view the complete answer paper.

OR
310 marks
a

What are the three differences between the conversion codes for input formatting and output formatting? Explain them with examples.

5 marks

Answer

Sign in to view the complete answer paper.

b

What is the need of explicit type conversion in C? How to cast the data?

5 marks

Answer

Sign in to view the complete answer paper.

410 marks
a

Write a recursive function to solve towers of Hanoi problem and trace it with different input.

5 marks

Answer

Sign in to view the complete answer paper.

b

Discuss various storage classes of C.

5 marks

Answer

Sign in to view the complete answer paper.

OR
510 marks
a

Write a function that copies a one-dimensional array of n elements into a two-dimensional array of k-rows and j-columns. The rows and columns must be a valid factor of the number of elements in the one-dimensional array i.e., k * j = n.

5 marks

Answer

Sign in to view the complete answer paper.

b

Discuss the different ways of passing arrays as a parameter to a function.

5 marks

Answer

Sign in to view the complete answer paper.

610 marks
a

Discuss dynamic memory management in C.

5 marks

Answer

Sign in to view the complete answer paper.

b

Explain in detail applications of pointers.

5 marks

Answer

Sign in to view the complete answer paper.

OR
7

Write a C program that converts a string representing a number in Roman numeral form to decimal form. [Follow regular convention for Roman numbers, Read string - parse it to convert in to decimal] Eg: Input: XL output: 40

10 marks

Answer

Sign in to view the complete answer paper.

810 marks
a

How to pass a structure to a function? Give illustrations.

5 marks

Answer

Sign in to view the complete answer paper.

b

Define a structure of arrays. Write code to read values in to this structure.

5 marks

Answer

Sign in to view the complete answer paper.

OR
910 marks
a

Is enumeration a derived data type? Justify your answer with suitable example.

5 marks

Answer

Sign in to view the complete answer paper.

b

Discuss any three types of preprocessor commands.

5 marks

Answer

Sign in to view the complete answer paper.

1010 marks
a

Compare formatting input/output functions with scanf and printf.

5 marks

Answer

Sign in to view the complete answer paper.

b

What is the purpose of ungetc( ) function.

5 marks

Answer

Sign in to view the complete answer paper.

OR
11

Write a program to read two file names, append the first file content at the end of the second file content.

10 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the question paper of COMPUTER PROGRAMMING IN C from JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD for B.Tech AE I I-I, May - 2018, R16.

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

Other papers in COMPUTER PROGRAMMING IN C

Loading Question Papers

Fetching data from database...