JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD MCA 2020 COMPUTER PROGRAMMING USING C Previous Question Paper (January - 2020 - R17)
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
Discuss about the features of procedure oriented programming languages.
Answer
Procedure-oriented programming (POP) focuses on a step-by-step approach to solving problems using functions. Its key features include:
- Top-down approach: Programs are broken down into smaller, manageable functions starting from the main logic.
- Emphasis on functions: The primary focus is on algorithms and the sequence of actions rather than data.
- Global data: Data moves freely across functions, which can lead to security risks.
- Modularity: Code is organized into reusable functions, improving readability.
- Sequential execution: Instructions are executed in a specific, predefined order.
Describe any five preprocessor directives in C with examples.
Answer
Preprocessor directives are commands processed before compilation:
- #include: Used to include header files. Example:
#include <stdio.h> - #define: Used to define macros or constants. Example:
#define PI 3.14 - #undef: Used to undefine a macro. Example:
#undef PI - #ifdef: Conditional compilation check if a macro is defined. Example:
#ifdef DEBUG - #ifndef: Conditional compilation check if a macro is not defined. Example:
#ifndef HEADER_FILE
What is the role of pointers in inter function communication?
Answer
Sign in to view the complete answer paper.
What is a structure? How to define and declare a structure in C?
Answer
Sign in to view the complete answer paper.
What are the various types of files supported in C?
Answer
Sign in to view the complete answer paper.
Part B
What is an operator? Describe precedence of various operators in C and their associativity.
Answer
Sign in to view the complete answer paper.
What is type conversion? Explain implicit and explicit type conversions in C with suitable examples.
Answer
Sign in to view the complete answer paper.
Evaluate the following expression in C with the values P=5, Q=20, R=15
Answer
Sign in to view the complete answer paper.
Enumerate all the bitwise operators in C with example.
Answer
Sign in to view the complete answer paper.
Demonstrate break and continue statements with suitable examples.
Answer
Sign in to view the complete answer paper.
Write a C program to find factorial of given number using recursive functions.
Answer
Sign in to view the complete answer paper.
Explain about various storage classes in C with suitable examples.
Answer
Sign in to view the complete answer paper.
Demonstrate all the iterative statements in C with examples.
Answer
Sign in to view the complete answer paper.
Define an Array. What are the advantages of Arrays? How to declare and initialize string values using arrays in C?
Answer
Sign in to view the complete answer paper.
Write a C program for addition of two matrices.
Answer
Sign in to view the complete answer paper.
How to pass an array to a function? Explain with an example program.
Answer
Sign in to view the complete answer paper.
What is pointer to pointers? Give syntax and an example.
Answer
Sign in to view the complete answer paper.
How to define union in C? Differentiate between unions and structures.
Answer
Sign in to view the complete answer paper.
Explain about any five String built-in functions with syntax and examples.
Answer
Sign in to view the complete answer paper.
Write a C program to read 3 student details such as Htno, name, marks in 5 subjects and calculate & display total and average marks of each student.
Answer
Sign in to view the complete answer paper.
Write syntax and examples for getc( ), fgetc( ), putc( ) and fputc( ) functions.
Answer
Sign in to view the complete answer paper.
Write a C program to reverse the content of given file using fseek( ) function.
Answer
Sign in to view the complete answer paper.
Differentiate between sequential access files and random access files.
Answer
Sign in to view the complete answer paper.
Write a C program to concatenate the contents of two files into another file.
Answer
Sign in to view the complete answer paper.