JNTU

JNTU MCA 2023 COMPUTER PROGRAMMING USING C Previous Question Paper (March - 2023 - R17)

MCA | 2023 | I | R17 | March - 2023

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

Note: i) Question paper consists of Part A, Part B. ii) Part A is compulsory, which carries 25 marks. In Part A, Answer all questions. iii) In Part B, Answer any one question from each unit. Each question carries 10 marks and may have a, b as sub questions.

Part A

125 marks
a

Explain list wise operators.

5 marks

Answer

In C, there is no specific operator called a 'list-wise' operator. This term is often a misnomer for the comma operator (,), which allows multiple expressions to be evaluated in a single statement. The expressions are evaluated from left to right, and the value of the entire expression is the value of the rightmost operand.

value = (expression1, expression2, ..., expressionN);

For example, in x = (y=5, y+10);, y is assigned 5, and then x is assigned 15.

b

Write a C program to check whether a number is positive or negative.

5 marks

Answer

#include <stdio.h>
int main() {
    int n;
    printf("Enter a number: ");
    scanf("%d", &n);
    if (n >= 0) printf("Positive");
    else printf("Negative");
    return 0;
}
c

What is a Pointer? Mention the advantages of pointers. How do you declare a pointer variable? Explain.

5 marks

Answer

Sign in to view the complete answer paper.

d

Define a structure and state how the members of a structure are accessed with example.

5 marks

Answer

Sign in to view the complete answer paper.

e

What is difference between file opening mode r+ and w+?

5 marks

Answer

Sign in to view the complete answer paper.

Part B

210 marks
a

What is an operator? List and explain various types of operators in C.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write a C program that prints the size of int, float, double and char variables.

5 marks

Answer

Sign in to view the complete answer paper.

OR
310 marks
a

What is type conversion? Explain two types of conversion with examples.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write a C program to find the area and perimeter of a circle.

5 marks

Answer

Sign in to view the complete answer paper.

410 marks
a

Write the usage of break and continue statement with example.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write a program to calculate factorial of a number using function.

5 marks

Answer

Sign in to view the complete answer paper.

OR
510 marks
a

Compare and contrast while and do while loop.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write a C program to print the odd numbers from X to Y using do while loop.

5 marks

Answer

Sign in to view the complete answer paper.

610 marks
a

Explain pointers to functions.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write a program to check whether an array is ordered. If ordered, print a suitable message as “ascending” or “descending” otherwise “not ordered”.

5 marks

Answer

Sign in to view the complete answer paper.

OR
710 marks
a

With proper examples explain different arithmetic operations on pointers.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write a C program to store numbers into an array and find the frequency of a particular number in array and print it.

5 marks

Answer

Sign in to view the complete answer paper.

810 marks
a

Explain an array of structures with examples.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write a C program for passing structures as function arguments and returning a structure from a function.

5 marks

Answer

Sign in to view the complete answer paper.

OR
910 marks
a

Explain different approaches that can be used to pass structures as function arguments. Illustrate each of them with suitable example.

5 marks

Answer

Sign in to view the complete answer paper.

b

What are bit-fields? Explain their significance.

5 marks

Answer

Sign in to view the complete answer paper.

10

Write a program to read data from keyboard, write it to a file called “INPUT”, again read the same data from the “INPUT” file and display item on the screen.

10 marks

Answer

Sign in to view the complete answer paper.

OR
11

Create a structure named employee containing name, age and salary. Write a C program to read employee records and write to a file. Then read the records from file and display them.

10 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the question paper of COMPUTER PROGRAMMING USING C from JNTU for MCA 2023 I, March - 2023, R17.

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

Other papers in COMPUTER PROGRAMMING USING C

Loading Question Papers

Fetching data from database...