JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD MCA 2018 COMPUTER PROGRAMMING USING C Previous Question Paper (January - 2018 - R15)
Note: This question paper contains two parts A and B. Part A is compulsory which carries 25 marks. Answer all questions in Part A. Part B consists of 5 Units. Answer any one full question from each unit. Each question carries 10 marks and may have a, b, c as sub questions.
PART - A
Write a program to convert the Fahrenheit into degree Celsius.
Answer
The formula to convert Fahrenheit (F) to Celsius (C) is C = (F - 32) * 5 / 9.
#include <stdio.h>
int main() {
float f, c;
printf("Enter temperature in Fahrenheit: ");
scanf("%f", &f);
c = (f - 32) * 5 / 9;
printf("Celsius: %.2f\n", c);
return 0;
}Explain the recursive function with an example and also give its limitations.
Answer
A recursive function is a function that calls itself to solve a smaller instance of the same problem. It requires a base case to terminate the recursion.
Example: Calculating factorial of n.
int fact(int n) {
if (n == 0) return 1;
return n * fact(n - 1);
}Limitations: Recursive functions consume significant stack memory for each call, which can lead to stack overflow errors if the depth is too large. They are also generally slower than iterative solutions due to function call overhead.
Explain the drawbacks of pointers in detail.
Answer
Sign in to view the complete answer paper.
Explain the functions of read and write characters.
Answer
Sign in to view the complete answer paper.
Explain about the rewind ( ) with an example.
Answer
Sign in to view the complete answer paper.
PART - B
Explain the classification of computer software.
Answer
Sign in to view the complete answer paper.
Explain the different types of operators are used in C.
Answer
Sign in to view the complete answer paper.
Explain about user defined functions and inter function communication.
Answer
Sign in to view the complete answer paper.
Write a program to find the GCD of given numbers by using functions.
Answer
Sign in to view the complete answer paper.
Explain the type qualifier with an example.
Answer
Sign in to view the complete answer paper.
Write a program to read a matrix and displays sum of the elements below the main diagonal.
Answer
Sign in to view the complete answer paper.
Explain the pointers for inter function communication
Answer
Sign in to view the complete answer paper.
What is an array? Explain how is an array represented in memory.
Answer
Sign in to view the complete answer paper.
Write a program to read and display the information of all the students in the class. Then edit the details of the ith student and redisplay the entire information by using structures.
Answer
Sign in to view the complete answer paper.
Write a program that uses a structure called date that has is passed to an is LeapYear function to determine if the year is a leap year.
Answer
Sign in to view the complete answer paper.
Explain the different types of File modes in C.
Answer
Sign in to view the complete answer paper.
Write a program to compare two files to check whether they are identical or not.
Answer
Sign in to view the complete answer paper.