JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech I Year COMPUTER PROGRAMMING Previous Question Paper (May - 2018 - R13)
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
Distinguish between variables and constants. Give example.
Answer
A variable is a named storage location in memory whose value can be modified during the execution of a program. In contrast, a constant is a fixed value that does not change throughout the program's lifecycle.
For example, in C, the declaration
Explain the difference between break, goto and continue statements.
Answer
The break, continue, and goto statements are used to alter the normal flow of program execution:
- break: Immediately terminates the innermost loop (for, while, do-while) or switch statement in which it appears. Control shifts to the first statement following the loop or switch block.
- continue: Skips the remaining statements in the current iteration of a loop and forces the next iteration to begin immediately. It does not terminate the loop.
- goto: An unconditional jump statement that transfers control directly to a labeled statement within the same function. It is generally discouraged in structured programming due to the risk of creating complex, unreadable code.
What are the storage classes in C?
Answer
Sign in to view the complete answer paper.
Write a C program to interchange two values.
Answer
Sign in to view the complete answer paper.
Give the syntax of calloc function.
Answer
Sign in to view the complete answer paper.
What is a dangling Pointer? How it is different from normal Pointer?
Answer
Sign in to view the complete answer paper.
Write the array applications.
Answer
Sign in to view the complete answer paper.
Distinguish between text and binary files.
Answer
Sign in to view the complete answer paper.
Write brief notes on unions.
Answer
Sign in to view the complete answer paper.
What are the operations performed in linked lists?
Answer
Sign in to view the complete answer paper.
Part B
State and explain various identifiers in C program. And also discuss about operator precedence in expression evaluation with a suitable example.
Answer
Sign in to view the complete answer paper.
Write and explain the structure of C program.
Answer
Sign in to view the complete answer paper.
Write a program to print prime numbers up to a given number ānā.
Answer
Sign in to view the complete answer paper.
In what way a recursive function differs from non-recursive functions? Explain.
Answer
Sign in to view the complete answer paper.
With the help of flowchart and example program explain the while loop.
Answer
Sign in to view the complete answer paper.
Define a function for determining whether a given character is a vowel or not.
Answer
Sign in to view the complete answer paper.
Write the program for multiplication of two matrices?
Answer
Sign in to view the complete answer paper.
Discuss the programming applications of pointers.
Answer
Sign in to view the complete answer paper.
Explain the role of pointers in inter function communication.
Answer
Sign in to view the complete answer paper.
Illustrate the character input/output functions with suitable examples.
Answer
Sign in to view the complete answer paper.
What are the string manipulation functions? Explain any three of them.
Answer
Sign in to view the complete answer paper.
What is the main reason for using structure? What special keyword is used in defining a structure? Illustrate with example.
Answer
Sign in to view the complete answer paper.
Demonstrate how one structure can be copied to another of the same type.
Answer
Sign in to view the complete answer paper.
How to read from and write to a file? Explain with examples.
Answer
Sign in to view the complete answer paper.
What is file? Explain about the Input and output functions of files.
Answer
Sign in to view the complete answer paper.
Sort the following 10 elements using bubble sort technique. Write the algorithm for the same. 85 53 96 35 27 87 37 12 90 23
Answer
Sign in to view the complete answer paper.
Give brief description about storage representation on queues.
Answer
Sign in to view the complete answer paper.
Write a program to implement stack using arrays.
Answer
Sign in to view the complete answer paper.