JNTU
JNTU B.Tech I Year PROGRAMMING FOR PROBLEM SOLVING Previous Question Paper (December 2019/January 2020 - R18)
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.
Part A
Name any five features of C programming Language.
Answer
Five features of C are: 1. Simple and efficient, 2. Portable, 3. Middle-level language, 4. Rich set of built-in operators, and 5. Supports modular programming through functions.
How to declare, define and initialize a pointer?
Answer
Declaration: int *ptr;. Definition (Assigning address): ptr = &var;. Initialization: int *ptr = &var;.
Define preprocessor directive.
Answer
Sign in to view the complete answer paper.
What is meant by function prototype?
Answer
Sign in to view the complete answer paper.
What are the advantages of bubble sort?
Answer
Sign in to view the complete answer paper.
Write any two bitwise operators with examples.
Answer
Sign in to view the complete answer paper.
What are the applications of an array?
Answer
Sign in to view the complete answer paper.
Differentiate between text files and binary files.
Answer
Sign in to view the complete answer paper.
What are the limitations of using recursive functions?
Answer
Sign in to view the complete answer paper.
How does linear search differ from binary search?
Answer
Sign in to view the complete answer paper.
Part B
What is the importance of precedence and associativity in evaluating an expression?
Answer
Sign in to view the complete answer paper.
How is ‘switch’ used as a multi-way selection statement? Explain with suitable example.
Answer
Sign in to view the complete answer paper.
State the purpose of unary and conditional operators.
Answer
Sign in to view the complete answer paper.
What is the significant of ‘break’ and ‘continue’ statements?
Answer
Sign in to view the complete answer paper.
Discuss about command-line arguments.
Answer
Sign in to view the complete answer paper.
Using two dimensional array, write a C program to find the inverse of a 2x2 matrix.
Answer
Sign in to view the complete answer paper.
Demonstrate the usage of self referential structures using a program.
Answer
Sign in to view the complete answer paper.
List and explain various basic string functions available in C.
Answer
Sign in to view the complete answer paper.
Demonstrate the following functions with a correct syntax and code: a) ftell( ) b) fseek( ) c) rewind( )
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 given file.
Answer
Sign in to view the complete answer paper.
Write a C program to illustrate define, undef directives.
Answer
Sign in to view the complete answer paper.
Discuss various methods of passing parameters to functions with suitable C code.
Answer
Sign in to view the complete answer paper.
How to handle memory leaks and dangling pointers?
Answer
Sign in to view the complete answer paper.
Write a C program that uses calloc( ) to create a memory block for storing n integers and print the stored contents.
Answer
Sign in to view the complete answer paper.
Write an algorithm for finding the maximum number of an array elements.
Answer
Sign in to view the complete answer paper.
Explain how linear search works and mention its pros and cons.
Answer
Sign in to view the complete answer paper.
Write a C program to demonstrate how insertion sort works.
Answer
Sign in to view the complete answer paper.
Write a C program to find whether a given number is prime or not.
Answer
Sign in to view the complete answer paper.