JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD MCA I COMPUTER PROGRAMMING Previous Question Paper (July/August - 2021 - R13)

MCA | I | I | R13 | July/August - 2021

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

Answer any five questions. All questions carry equal marks.

Main

112 marks
a

What is a data type? List various data types in C and write about their sizes in bytes.

6 marks

Answer

A data type is a classification that specifies the type of value a variable can hold and the operations that can be performed on that data. It determines how much memory is allocated for the variable and how the bits are interpreted.

The common data types in C and their typical sizes on a 32-bit system are:

  • char: 1 byte, used for single characters.
  • int: 2 or 4 bytes, used for integer values.
  • float: 4 bytes, used for single-precision floating-point numbers.
  • double: 8 bytes, used for double-precision floating-point numbers.
  • void: 0 bytes, represents the absence of a value.

Modifiers like short, long, signed, and unsigned can be applied to these types to alter their range and storage requirements.

b

Enumerate all the operators in C with appropriate examples.

6 marks

Answer

C operators are symbols used to perform operations on variables and values:

  1. Arithmetic Operators (+, -, *, /, %): Used for math, e.g.,
    a + b
    .
  2. Relational Operators (==, !=, >, <, >=, <=): Used for comparisons, e.g.,
    a > b
    .
  3. Logical Operators (&&, ||, !): Used for boolean logic, e.g.,
    (a && b)
    .
  4. Bitwise Operators (&, |, ^, ~, <<, >>): Operate on bits, e.g.,
    a & b
    .
  5. Assignment Operators (=, +=, -=, etc.): Assign values, e.g.,
    a += 5
    .
  6. Increment/Decrement Operators (++ , --): Change values by one, e.g.,
    a++
    .
  7. Conditional (Ternary) Operator (?:): A shorthand for if-else, e.g.,
    condition ? x : y
    .
  8. Special Operators (sizeof, &, *, ->): Used for memory and pointer operations, e.g.,
    sizeof(int)
    .
212 marks
a

Evaluate the following expression in C with the values A=5, B=20, C=15, D=10:

A + (B*C / D) - A + C * D
6 marks

Answer

Sign in to view the complete answer paper.

b

Write a C program to find biggest of given three numbers.

6 marks

Answer

Sign in to view the complete answer paper.

312 marks
a

Demonstrate all the decision making statements in C with examples.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write a C program to find the sum of 20 natural numbers.

7 marks

Answer

Sign in to view the complete answer paper.

412 marks
a

Differentiate between call by value and call by reference in C.

6 marks

Answer

Sign in to view the complete answer paper.

b

Write a C program to generate Fibonacci series using recursive functions.

6 marks

Answer

Sign in to view the complete answer paper.

512 marks
a

How to define and declare multi-dimensional arrays? Give an example.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write a C program for multiplication of two matrices.

7 marks

Answer

Sign in to view the complete answer paper.

612 marks
a

Define a pointer. What are the advantages of pointers than arrays?

6 marks

Answer

Sign in to view the complete answer paper.

b

Discuss about malloc( ) and calloc( ) memory allocation functions with suitable examples.

6 marks

Answer

Sign in to view the complete answer paper.

712 marks
a

Demonstrate self-referential structures in C with suitable examples.

7 marks

Answer

Sign in to view the complete answer paper.

b

Explain about enumerated data types in detail.

5 marks

Answer

Sign in to view the complete answer paper.

812 marks
a

Write syntax and examples for fopen( ), fclose( ) and fflush( ) functions.

7 marks

Answer

Sign in to view the complete answer paper.

b

Write syntax and examples for positioning functions in C.

5 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 from JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD for MCA I I, July/August - 2021, R13.

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

Other papers in COMPUTER PROGRAMMING

Loading Question Papers

Fetching data from database...