JNTU
JNTU MCA 2019 COMPUTER PROGRAMMING Previous Question Paper (April/May - 2019 - 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.
Part A
Discuss in detail about logical operators and bitwise operators.
Answer
Logical operators (&&, ||, !) are used to combine or negate conditional expressions, returning a boolean result (true or false). They are primarily used in control flow statements like if or while to evaluate multiple conditions. Bitwise operators (&, |, ^, ~, <<, >>) perform operations on the individual bits of integer operands. They are used for low-level programming, such as manipulating hardware registers, performing fast arithmetic, or setting and clearing specific bit flags.
Write down the differences between switch-case and if-else ladder.
Answer
The switch-case statement is used for multi-way branching based on the equality of a single integer or character expression against constant values, making it more readable for discrete choices. The if-else ladder is more flexible, allowing for the evaluation of complex relational or logical expressions in each condition. Furthermore, switch-case is typically implemented using jump tables for efficiency, whereas if-else ladder evaluates conditions sequentially.
Explain briefly about malloc( ) and calloc( ) functions.
Answer
Sign in to view the complete answer paper.
What are self-referential structures? Discuss briefly.
Answer
Sign in to view the complete answer paper.
Explain briefly about feof( ) and ferror( ) functions.
Answer
Sign in to view the complete answer paper.
Unit I
Explain the need of compiler, linker and loader in computer programming.
Answer
Sign in to view the complete answer paper.
Briefly explain the classification of computer languages.
Answer
Sign in to view the complete answer paper.
What is an unsigned integer constant? What is the significance of declaring a constant as unsigned?
Answer
Sign in to view the complete answer paper.
Describe various operators used in C programming.
Answer
Sign in to view the complete answer paper.
Unit II
Explain briefly about repetition statements in C with clear syntax and example.
Answer
Sign in to view the complete answer paper.
Discuss the limitations of recursive functions.
Answer
Sign in to view the complete answer paper.
Write a C program to test whether a given number is palindrome or not.
Answer
Sign in to view the complete answer paper.
Briefly explain various storage classes with their scope and persistent.
Answer
Sign in to view the complete answer paper.
Unit III
Explain how to declare, define and initialize pointers in C with an example program.
Answer
Sign in to view the complete answer paper.
Write down the advantages and disadvantages of arrays.
Answer
Sign in to view the complete answer paper.
What is a dynamic array? Explain how to create and process a dynamic array with an example program.
Answer
Sign in to view the complete answer paper.
Unit IV
Explain the general format for declaring and accessing members of a structure with an example C program for generating grades of students in a class.
Answer
Sign in to view the complete answer paper.
How to create and initialize arrays of structures in C? Illustrate with an example.
Answer
Sign in to view the complete answer paper.
Discuss about various string manipulation functions available in C.
Answer
Sign in to view the complete answer paper.
Unit V
Describe the following functions in C: a) fread( ) b) fwrite( ) c) fseek( )
Answer
Sign in to view the complete answer paper.
Write a C program that prints a specified number of records from the beginning of a file.
Answer
Sign in to view the complete answer paper.
Write down the merits and demerits of text files over binary files.
Answer
Sign in to view the complete answer paper.