JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD MCA 2017 COMPUTER PROGRAMMING Previous Question Paper (August - 2017 - R13)

MCA | 2017 | I | R13 | August - 2017

Answer PaperPaper Code: 811ACMaximum Marks: 60Time: 3hrs

This question paper contains two parts A and B. Part A is compulsory. Part B consists of 5 Units. Answer any one full question from each unit.

Part A

Answer all questions in Part A.

120 marks
a

Explain the type conversions allowed in ‘C’ Language.

4 marks

Answer

Type conversion in C converts a value of one data type into another. There are two types:

  1. Implicit Type Conversion (Type Promotion): Performed automatically by the compiler when different data types are used in an expression. The smaller data type is promoted to the larger type (e.g., char to int, int to float) to prevent data loss.
  2. Explicit Type Conversion (Type Casting): Performed manually by the programmer using the cast operator
    (type_name) expression
    . This forces the conversion of a value to a specific type, which may result in truncation or loss of precision.
b

What is the use of default alternative in Switch statement? Compare use of switch with nested if-else statement.

4 marks

Answer

The default case in a switch statement acts as a catch-all block that executes if none of the case constants match the switch expression value. It is optional but recommended for handling unexpected inputs.

Comparison with nested if-else:

  • Readability: Switch is cleaner and more readable for multiple discrete integer or character comparisons.
  • Flexibility: Nested if-else can handle complex logical conditions and ranges, whereas switch is limited to equality checks against constants.
  • Performance: Switch statements are often optimized by compilers into jump tables, making them faster than long chains of if-else conditions.
c

How to initialize array? Explain with example and write its uses.

4 marks

Answer

Sign in to view the complete answer paper.

d

Define structure and union. Explain the way of declaring and accessing them.

4 marks

Answer

Sign in to view the complete answer paper.

e

Explain the concept of files, records and fields.

4 marks

Answer

Sign in to view the complete answer paper.

Part B

2

What do you understand by operators? Explain the use of the following operators: a) relational b) logical c) arithmetic operators.

8 marks

Answer

Sign in to view the complete answer paper.

OR
38 marks
a

Discuss precedence order and associativity of operators.

4 marks

Answer

Sign in to view the complete answer paper.

b

What is typecasting? When should a typecast be used?

4 marks

Answer

Sign in to view the complete answer paper.

4

A cashier has currency notes of denominations 10, 50 and 100 each of x, y and z quantities. If the amount to be withdrawn is input through the keyboard, find the total number of currency notes of each denomination the cashier will have to give the withdrawer.

8 marks

Answer

Sign in to view the complete answer paper.

OR
58 marks
a

What are functions? What is the advantage of using function in a program?

4 marks

Answer

Sign in to view the complete answer paper.

b

What are macros? Is it better to use a macro or a function?

4 marks

Answer

Sign in to view the complete answer paper.

6

Write a C language program to read one matrix and find the sum of its diagonal elements.

8 marks

Answer

Sign in to view the complete answer paper.

OR
7

What is dynamic memory allocation? Write and explain the different dynamic memory allocation functions in C.

8 marks

Answer

Sign in to view the complete answer paper.

8

What do you understand by strings? How do you declare a string? Write a program to copy one string into another.

8 marks

Answer

Sign in to view the complete answer paper.

OR
9

Explain array of structures and structure within a structure with examples.

8 marks

Answer

Sign in to view the complete answer paper.

10

Write a program that prints only those lines from a file which are containing more than 50 characters.

8 marks

Answer

Sign in to view the complete answer paper.

OR
11

Write a C language program to copy the contents of one file to another file using command line arguments.

8 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the question paper of COMPUTER PROGRAMMING from JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD for MCA 2017 I, August - 2017, R13.

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

Other papers in COMPUTER PROGRAMMING

Loading Question Papers

Fetching data from database...