JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD MCA C AND DATA STRUCTURES Previous Question Paper (October/November - 2022 - R20)

MCA | I | R20 | October/November - 2022

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

Answer any five questions

All questions carry equal marks

Main

115 marks
a

Explain the steps involved in Creating and Running the programs?

8 marks

Answer

The process of creating and running a C program involves several sequential stages:

  1. Writing the Source Code: Use a text editor to write the program code and save it with a .c extension.
  2. Preprocessing: The preprocessor handles directives (e.g., #include, #define), performing text substitution and file inclusion to produce an expanded source file.
  3. Compilation: The compiler translates the preprocessed source code into assembly language specific to the target processor architecture.
  4. Assembly: The assembler converts the assembly code into machine-readable object code (a .obj or .o file).
  5. Linking: The linker combines the object file with necessary library functions (like printf or scanf) to create a single executable file (a .exe file).
  6. Execution: The operating system loads the executable file into memory and executes the instructions to produce the desired output.
b

Discuss different bit wise operators in ‘C’ using suitable examples.

7 marks

Answer

Bitwise operators perform operations on individual bits of integer operands. The primary operators are:

  • Bitwise AND (&): Returns 1 if both bits are 1. Example: 5 & 3 (0101 & 0011) results in 0001 (1).
  • Bitwise OR (|): Returns 1 if at least one bit is 1. Example: 5 | 3 (0101 | 0011) results in 0111 (7).
  • Bitwise XOR (^): Returns 1 if bits are different. Example: 5 ^ 3 (0101 ^ 0011) results in 0110 (6).
  • Bitwise NOT (~): Inverts all bits. Example: ~5 (binary 0101) becomes 1010 (in two's complement, this represents -6).
  • Left Shift (<<): Shifts bits to the left by a specified number of positions, filling with zeros. Example: 5 << 1 (0101 becomes 1010) results in 10.
  • Right Shift (>>): Shifts bits to the right by a specified number of positions. Example: 5 >> 1 (0101 becomes 0010) results in 2.
215 marks
a

Draw flowchart for printing the sum of n numbers.

8 marks

Answer

Sign in to view the complete answer paper.

b

List out type conversions in ‘C’ using suitable examples.

7 marks

Answer

Sign in to view the complete answer paper.

315 marks
a

Explain the switch statement with syntax and example.

8 marks

Answer

Sign in to view the complete answer paper.

b

Differentiate between while and do while statements with example.

7 marks

Answer

Sign in to view the complete answer paper.

415 marks
a

What is a null statement? Explain its usefulness with suitable example.

7 marks

Answer

Sign in to view the complete answer paper.

b

Write a program using for loop to reverse the digits of the number.

8 marks

Answer

Sign in to view the complete answer paper.

515 marks
a

Write a C program to perform the addition of two matrices.

8 marks

Answer

Sign in to view the complete answer paper.

b

Explain the difference between ‘call by value’ and ‘call by reference’ using pointers.

7 marks

Answer

Sign in to view the complete answer paper.

615 marks
a

Why Multidimensional array is used? Explain it with suitable example.

8 marks

Answer

Sign in to view the complete answer paper.

b

List out the memory allocation functions and explain their importance.

7 marks

Answer

Sign in to view the complete answer paper.

715 marks
a

Define Structure. Explain how the structure can be accessed using suitable examples.

8 marks

Answer

Sign in to view the complete answer paper.

b

Explain how End of File is detected using a small example.

7 marks

Answer

Sign in to view the complete answer paper.

815 marks
a

What is insertion sort? Sort the following elements using insertion sort method: 24 56 47 35 10 90 82 31.

8 marks

Answer

Sign in to view the complete answer paper.

b

Define a stack. Describe ways to implement stack.

7 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 I, October/November - 2022, 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...