JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD MCA 1 C AND DATA STRUCTURES Previous Question Paper (July/August - 2021 - R20)

MCA | 1 | I | R20 | July/August - 2021

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

Answer any five questions. All questions carry equal marks.

Main

115 marks
a

Write about different operators supported in C language with example.

7 marks

Answer

C language provides a rich set of operators to perform various operations on data. They are categorized as follows:

  • Arithmetic Operators: Used for mathematical calculations (+, -, *, /, %). Example: a + b.
  • Relational Operators: Used to compare two values (==, !=, >, <, >=, <=). Example: a > b returns 1 if true.
  • Logical Operators: Used to combine conditions (&&, ||, !). Example: (a > 5 && b < 10).
  • Assignment Operators: Used to assign values to variables (=, +=, -=, *=, /=). Example: a += 5 is equivalent to a = a + 5.
  • Bitwise Operators: Perform operations at the bit level (&, |, ^, ~, <<, >>). Example: a & b.
  • Increment/Decrement Operators: Used to change the value of a variable by 1 (++a, a++, --a, a--).
  • Conditional (Ternary) Operator: A shorthand for if-else (? :). Example: (a > b) ? a : b;
  • Special Operators: Includes comma operator (,), sizeof operator, and pointer operators (&, *).
b

What is Type casting? Explain about various type conversions allowed in C language.

8 marks

Answer

Type casting is the process of converting a variable from one data type to another. C supports two types of conversions:

  • Implicit Type Conversion (Automatic): Performed automatically by the compiler when different data types are used in an expression. The compiler promotes the smaller type to the larger type to prevent data loss (e.g., char/short to int, int to float).
    int a = 10; float b = 5.5; float res = a + b; // a is promoted to float
  • Explicit Type Conversion (Type Casting): Performed manually by the programmer using the cast operator (type_name). This is necessary when converting a larger type to a smaller type, which may result in data truncation.
    (type_name) expression;
    Example:
    float x = 10.5; int y = (int)x; // x is explicitly cast to int, resulting in 10
215 marks
a

Explain the significance of ‘break’ and ‘continue’ statement with suitable program.

7 marks

Answer

Sign in to view the complete answer paper.

b

Write ‘C’ program to print the Fibonacci sequence upto given number using while loop.

8 marks

Answer

Sign in to view the complete answer paper.

315 marks
a

Define two-dimensional array. Write a C program for addition of two matrices.

7 marks

Answer

Sign in to view the complete answer paper.

b

Discuss about pointers to pointers with suitable C program.

8 marks

Answer

Sign in to view the complete answer paper.

415 marks
a

How to pass a structure to a function? Explain with a C program.

7 marks

Answer

Sign in to view the complete answer paper.

b

Write a C program to copy the contents of one file to another.

8 marks

Answer

Sign in to view the complete answer paper.

515 marks
a

Write a C program to sort given elements using insertion sort: 20, 5, 39, 16, 65, 40.

7 marks

Answer

Sign in to view the complete answer paper.

b

Write about the procedure for insert and delete operations using Queue.

8 marks

Answer

Sign in to view the complete answer paper.

615 marks
a

What are the benefits of flowchart? Draw a flow chart to find given number is even or odd number.

8 marks

Answer

Sign in to view the complete answer paper.

b

Discuss about different types of computer languages in detail.

7 marks

Answer

Sign in to view the complete answer paper.

715 marks
a

Write about storage classes in ‘C’ with examples.

8 marks

Answer

Sign in to view the complete answer paper.

b

What is user-defined function? Explain about actual and formal parameters.

7 marks

Answer

Sign in to view the complete answer paper.

815 marks
a

Differentiate between Structures and Unions with examples.

7 marks

Answer

Sign in to view the complete answer paper.

b

Explain various string handling functions with syntax and examples.

8 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the solved question paper with answers of C AND DATA STRUCTURES from JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD for MCA 1 I, July/August - 2021, R20.

For the question paper without answers, switch to the Question Paper tab.

Other papers in C AND DATA STRUCTURES

Loading Question Papers

Fetching data from database...