JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech I Year PROGRAMMING FOR PROBLEM SOLVING Previous Question Paper (May/June - 2019 - R18)
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
Give a brief note on storage class.
Answer
A storage class in C defines the scope, visibility, and lifetime of a variable. The four primary storage classes are auto, extern, static, and register, which determine where the variable is stored in memory and how long it persists during program execution.
Give a note on unions.
Answer
A union is a user-defined data type that allows storing different data types in the same memory location. Unlike a structure, all members of a union share the same memory space, and the size of the union is equal to the size of its largest member.
How can we determine whether a file is successfully opened or not using fopen() function?
Answer
Sign in to view the complete answer paper.
Give syntax to create a pointer to function.
Answer
Sign in to view the complete answer paper.
How binary search works?
Answer
Sign in to view the complete answer paper.
What is a flowchart? How it is different from an algorithm?
Answer
Sign in to view the complete answer paper.
Write the advantages and disadvantages of using pointers.
Answer
Sign in to view the complete answer paper.
Write a ‘C’ program to read a binary file and print it on console
Answer
Sign in to view the complete answer paper.
Write short notes on dynamic memory allocation.
Answer
Sign in to view the complete answer paper.
How linear search is different from binary search?
Answer
Sign in to view the complete answer paper.
Part B
Explain typical steps for entering, compiling and executing ‘C’ programs.
Answer
Sign in to view the complete answer paper.
Write an algorithm to find the roots of a quadratic equation considering all cases.
Answer
Sign in to view the complete answer paper.
Distinguish between all loop statements along with a flowchart and with an example program.
Answer
Sign in to view the complete answer paper.
Write a program in ‘C’ to check whether a given integer number is odd or even.
Answer
Sign in to view the complete answer paper.
Give a brief note on Enumeration data type.
Answer
Sign in to view the complete answer paper.
Write a ‘C’ program to find the biggest number and smallest number of given ‘n’ numbers using arrays.
Answer
Sign in to view the complete answer paper.
Why structures are necessary? Explain Nested Structures with a valid example.
Answer
Sign in to view the complete answer paper.
Give a detailed note on pointer expressions.
Answer
Sign in to view the complete answer paper.
Explain Steps for file operations and different modes of files.
Answer
Sign in to view the complete answer paper.
Explain about preprocessor commands define, undef.
Answer
Sign in to view the complete answer paper.
Write a program to read a text file, convert all the lowercase characters into upper case and re-write the uppercase characters in the file.
Answer
Sign in to view the complete answer paper.
What is Recursion? Write a ‘C’ Program for Towers of Hanoi. Also specify in diagram for it.
Answer
Sign in to view the complete answer paper.
How to pass the structure to functions as an argument? Explain with a suitable example.
Answer
Sign in to view the complete answer paper.
Explain about Allocating memory for arrays of different data types.
Answer
Sign in to view the complete answer paper.
Give a brief note on insertion sort with an example.
Answer
Sign in to view the complete answer paper.
Discuss the time complexity of the bubble sort.
Answer
Sign in to view the complete answer paper.
Write a program in ‘C’ to print list of integers in ascending order using bubble sort and selection sort techniques.
Answer
Sign in to view the complete answer paper.