JNTU

JNTU MCA 1 COMPUTER PROGRAMMING USING C Previous Question Paper (October/November - 2022 - R17)

MCA | 1 | I | R17 | October/November - 2022

Answer PaperPaper Code: 841ACMaximum Marks: 75Time: 3 Hours

Answer any five questions. All questions carry equal marks.

Main

115 marks
a

Describe the different types of operators that are included in C?

8 marks

Answer

Operators in C are symbols that perform specific mathematical or logical manipulations on operands. They are categorized as follows:

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

How to write, compile, linking and running a C program?

7 marks

Answer

The process of executing a C program involves the following stages:

  1. Writing: The source code is written using a text editor and saved with a .c extension.
  2. Preprocessing: The preprocessor handles directives like #include and #define, producing an expanded source file.
  3. Compiling: The compiler translates the source code into assembly language or machine-level object code (.obj or .o file).
  4. Linking: The linker combines the object code with necessary library functions to create an executable file (.exe or a.out).
  5. Running: The executable file is loaded into memory by the operating system and executed, producing the desired output.
215 marks
a

Elaborate on the implicit and explicit type conversions?

8 marks

Answer

Sign in to view the complete answer paper.

b

Write C program to find the areas and perimeters of circle, square, rectangle and triangle?

7 marks

Answer

Sign in to view the complete answer paper.

315 marks
a

Write a program that replies either Leap Year or Not a Leap Year, given a year. It is a leap year if the year is divisible by 4 but not by 100. A year that is divisible by both 4 and 100 is a leap year if it is also divisible by 400.

7 marks

Answer

Sign in to view the complete answer paper.

b

Mention the limitations of recursion? Write a recursive method to compute the sum of the first N positive odd integers.

8 marks

Answer

Sign in to view the complete answer paper.

415 marks
a

Write for, do–while, and while statements to compute the following:

i) 1+3+7+ … + (220-1)

ii) 1×2×4×….× 220

7 marks

Answer

Sign in to view the complete answer paper.

b

How does macro simulate functions with/without parameters? Elaborate on nested macros, undefining macros and predefined macros?

8 marks

Answer

Sign in to view the complete answer paper.

515 marks
a

Write program to perform array sorting and Merge two sorted arrays into another array in a sorted order?

8 marks

Answer

Sign in to view the complete answer paper.

b

Write program to compute matrix transpose and multiplication?

7 marks

Answer

Sign in to view the complete answer paper.

615 marks
a

Use arrays to represent the three vertices of a triangle, calculate the length of the three sides of a triangle formed with these vertices. Then determine whether an equilateral triangle can be formed with the given vertices.

7 marks

Answer

Sign in to view the complete answer paper.

b

How to pass arrays to functions with/without pointers?

8 marks

Answer

Sign in to view the complete answer paper.

7

Write a menu-based C program to perform the following operations:

a) reading a complex number b) writing a complex number

c) addition of two complex numbers d) subtraction of two complex numbers

e) multiplication of two complex numbers

Represent the complex number using a structure.

15 marks

Answer

Sign in to view the complete answer paper.

815 marks
a

Write a program that opens an existing text file and copies it to a new text file with all lowercase letters changed to capital letters and all other characters unchanged.

7 marks

Answer

Sign in to view the complete answer paper.

b

Describe different file opening modes used with the fopen() function. Compare fscanf() and fread() functions?

8 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the solved question paper with answers of COMPUTER PROGRAMMING USING C from JNTU for MCA 1 I, October/November - 2022, R17.

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

Other papers in COMPUTER PROGRAMMING USING C

Loading Question Papers

Fetching data from database...