JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech I Year COMPUTER PROGRAMMING Previous Question Paper (January/February - 2024 - R15)

B.Tech | I Year | I-I | R15 | January/February - 2024

Answer PaperPaper Code: 121AFMaximum Marks: 75Time: 3 Hours

Note: i) Question paper consists of Part A, Part B. ii) Part A is compulsory, which carries 25 marks. In Part A, answer all questions. iii) In Part B, Answer any one question from each unit. Each question carries 10 marks and may have a, b as sub questions.

Part A

125 marks
a

Differentiate between a variable and a constant.

2 marks

Answer

A variable is a named storage location in memory whose value can be changed during program execution. A constant is a fixed value that does not change throughout the execution of the program once it is defined.

b

Discuss the differences between the pre-increment and post-increment operators in C. Give examples for both of them.

3 marks

Answer

In pre-increment (++a), the value of the variable is incremented before it is used in the expression. In post-increment (a++), the current value of the variable is used in the expression first, and then the variable is incremented.

Example: If a = 5, then b = ++a results in b = 6 and a = 6. Conversely, b = a++ results in b = 5 and a = 6.

c

Discuss the role of the #define directive in the preprocessor.

2 marks

Answer

Sign in to view the complete answer paper.

d

What is a user-defined function in C? Provide an example?

3 marks

Answer

Sign in to view the complete answer paper.

e

Explain the concept of the address-of operator (&) in relation to pointers.

2 marks

Answer

Sign in to view the complete answer paper.

f

Explain the purpose of malloc() function in dynamic memory allocation.

3 marks

Answer

Sign in to view the complete answer paper.

g

Discuss the role of the file pointer in file handling.

2 marks

Answer

Sign in to view the complete answer paper.

h

Define an enumerated type in C. Provide an example of its usage.

3 marks

Answer

Sign in to view the complete answer paper.

i

Write the time complexity of selection sort and bubble sort.

2 marks

Answer

Sign in to view the complete answer paper.

j

Define a linear list and explain its significance in data structures.

3 marks

Answer

Sign in to view the complete answer paper.

Part B

210 marks
a

Compare and contrast the if and switch statements in C.

3 marks

Answer

Sign in to view the complete answer paper.

b

Explain Bit-wise operators in C. Evaluate the bitwise AND operation for the given expression: a = 5 & 3.

7 marks

Answer

Sign in to view the complete answer paper.

OR
310 marks
a

Write a C program to display the first 10 natural numbers using a while loop.

7 marks

Answer

Sign in to view the complete answer paper.

b

Explain the difference between for and while loops.

3 marks

Answer

Sign in to view the complete answer paper.

410 marks
a

Explain the difference between a function declaration and a function definition. Write the significance of function prototypes in C.

4 marks

Answer

Sign in to view the complete answer paper.

b

Write a recursive function to calculate the factorial of a number.

6 marks

Answer

Sign in to view the complete answer paper.

OR
510 marks
a

When and where is the extern storage class typically used in C?

4 marks

Answer

Sign in to view the complete answer paper.

b

Write a program to transpose a matrix using arrays in C.

6 marks

Answer

Sign in to view the complete answer paper.

610 marks
a

How are pointers used for inter-function communication in C?

5 marks

Answer

Sign in to view the complete answer paper.

b

How can pointers be used to traverse an array?

5 marks

Answer

Sign in to view the complete answer paper.

OR
710 marks
a

Discuss the difference between a character array and a string in C.

4 marks

Answer

Sign in to view the complete answer paper.

b

Write a program that finds the length of a string without using the strlen() function.

6 marks

Answer

Sign in to view the complete answer paper.

810 marks
a

Explain the advantages and limitations of using bit fields.

4 marks

Answer

Sign in to view the complete answer paper.

b

Write a program that uses structures to represent a book with title, author, and publication year.

6 marks

Answer

Sign in to view the complete answer paper.

OR
910 marks
a

Write a C program that copies the contents of one binary file to another.

6 marks

Answer

Sign in to view the complete answer paper.

b

Enumerate the key differences between text and binary file formats in C.

4 marks

Answer

Sign in to view the complete answer paper.

1010 marks
a

Compare queues with stacks, highlighting their differences.

4 marks

Answer

Sign in to view the complete answer paper.

b

Discuss the applications of stacks.

6 marks

Answer

Sign in to view the complete answer paper.

OR
1110 marks
a

Explain how to insert a new node at the end of a singly linked list.

6 marks

Answer

Sign in to view the complete answer paper.

b

Discuss the conditions under which binary search is effective.

4 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the question paper of COMPUTER PROGRAMMING from JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD for B.Tech CSE I Year I-I, January/February - 2024, R15.

For the solved question paper with answers, switch to the Answer Paper tab.

Other papers in COMPUTER PROGRAMMING

Loading Question Papers

Fetching data from database...