JNTU
JNTU MCA 2020 COMPUTER PROGRAMMING Previous Question Paper (January - 2020 - R13)
Note: This question paper contains two parts A and B. Part A is compulsory which carries 20 marks. Answer all questions in Part A. Part B consists of 5 Units. Answer any one full question from each unit. Each question carries 8 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. Key features include: 1) Top-down approach: The program is broken down into smaller functions or procedures. 2) Emphasis on functions: The logic is centered around actions rather than data. 3) Global data: Data often moves freely across functions, which can lead to security issues. 4) Modularity: Code is organized into reusable blocks (functions), making it easier to manage and debug.
Describe any five preprocessor directives in C with examples.
Answer
Preprocessor directives are commands processed before compilation:
- #include: Includes header files, e.g., #include <stdio.h>.
- #define: Creates macros or constants, e.g., #define PI 3.14.
- #undef: Undefines a macro, e.g., #undef PI.
- #ifdef: Conditional compilation if a macro is defined, e.g., #ifdef DEBUG.
- #ifndef: Conditional compilation if a macro is not defined, e.g., #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 and 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.