JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech I COMPUTER PROGRAMMING IN C Previous Question Paper (May - 2018 - R16)
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.
Part A
Which statement is multi way selection statement? Why?
Answer
The switch statement is the multi-way selection statement. It is used because it allows a program to select one execution path from several alternatives based on the value of a single expression, which is more efficient and readable than using multiple nested if-else statements.
What is meant by time sharing environment?
Answer
A time-sharing environment is a computing system where multiple users can access the CPU simultaneously. The operating system allocates small time slices to each user or process in a round-robin fashion, creating the illusion that each user has exclusive access to the computer.
Evaluate the value of the following when x=3.45
Answer
Sign in to view the complete answer paper.
Can an assignment operator copy one array to another? Justify your answer.
Answer
Sign in to view the complete answer paper.
Give the picture to show the memory configuration for the declaration int (*a)[5];
Answer
Sign in to view the complete answer paper.
Differentiate between strspn and strcspn.
Answer
Sign in to view the complete answer paper.
What is the need of typedef command?
Answer
Sign in to view the complete answer paper.
Is macro an inline function? Justify your answer.
Answer
Sign in to view the complete answer paper.
Contrast text files and binary files.
Answer
Sign in to view the complete answer paper.
What is a system created stream? Give examples.
Answer
Sign in to view the complete answer paper.
Part B
Write an algorithm to find LCM of two numbers.
Answer
Sign in to view the complete answer paper.
Describe the process of program development.
Answer
Sign in to view the complete answer paper.
What are the three differences between the conversion codes for input formatting and output formatting? Explain them with examples.
Answer
Sign in to view the complete answer paper.
What is the need of explicit type conversion in C? How to cast the data?
Answer
Sign in to view the complete answer paper.
Write a recursive function to solve towers of Hanoi problem and trace it with different input.
Answer
Sign in to view the complete answer paper.
Discuss various storage classes of C.
Answer
Sign in to view the complete answer paper.
Write a function that copies a one-dimensional array of n elements into a two-dimensional array of k-rows and j-columns. The rows and columns must be a valid factor of the number of elements in the one-dimensional array i.e., k * j = n.
Answer
Sign in to view the complete answer paper.
Discuss the different ways of passing arrays as a parameter to a function.
Answer
Sign in to view the complete answer paper.
Discuss dynamic memory management in C.
Answer
Sign in to view the complete answer paper.
Explain in detail applications of pointers.
Answer
Sign in to view the complete answer paper.
Write a C program that converts a string representing a number in Roman numeral form to decimal form. [Follow regular convention for Roman numbers, Read string - parse it to convert in to decimal] Eg: Input: XL output: 40
Answer
Sign in to view the complete answer paper.
How to pass a structure to a function? Give illustrations.
Answer
Sign in to view the complete answer paper.
Define a structure of arrays. Write code to read values in to this structure.
Answer
Sign in to view the complete answer paper.
Is enumeration a derived data type? Justify your answer with suitable example.
Answer
Sign in to view the complete answer paper.
Discuss any three types of preprocessor commands.
Answer
Sign in to view the complete answer paper.
Compare formatting input/output functions with scanf and printf.
Answer
Sign in to view the complete answer paper.
What is the purpose of ungetc( ) function.
Answer
Sign in to view the complete answer paper.
Write a program to read two file names, append the first file content at the end of the second file content.
Answer
Sign in to view the complete answer paper.