JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech I Year PROGRAMMING FOR PROBLEM SOLVING Previous Question Paper (January/February - 2024 - R22)

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

Answer PaperPaper Code: 181APMaximum Marks: 60Time: 3 Hours

Part-A is compulsory. Part-B consists of ten questions (2-11) carrying 10 marks each. Answer one question from each unit.

Part A

1

Answer all sub-questions:

10 marks
a

List bitwise operators in C.

1 marks

Answer

Bitwise operators in C are used to perform operations at the level of individual bits. They are:

  • &: Bitwise AND
  • |: Bitwise OR
  • ^: Bitwise XOR
  • ~: Bitwise NOT (One's complement)
  • <<: Left shift
  • >>: Right shift
b

What is the purpose of type conversion?

1 marks

Answer

The purpose of type conversion (also known as type casting) is to convert a value from one data type to another. It ensures that operations involving mixed data types (e.g., adding an integer to a float) can be performed by the compiler by making the operands compatible, thereby preventing data loss or logical errors during evaluation.

c

What is an array?

1 marks

Answer

Sign in to view the complete answer paper.

d

What is the significance of the strcpy function?

1 marks

Answer

Sign in to view the complete answer paper.

e

What is the purpose of the preprocessor in C?

1 marks

Answer

Sign in to view the complete answer paper.

f

How can you check if a file exists before opening it in C?

1 marks

Answer

Sign in to view the complete answer paper.

g

What is a function prototype?

1 marks

Answer

Sign in to view the complete answer paper.

h

Define the term "function signature".

1 marks

Answer

Sign in to view the complete answer paper.

i

What is the time complexity of bubble sort?

1 marks

Answer

Sign in to view the complete answer paper.

j

What is the main advantage of binary search over linear search?

1 marks

Answer

Sign in to view the complete answer paper.

Part B

210 marks
a

Write an algorithm for finding the roots of a quadratic equation.

5 marks

Answer

Sign in to view the complete answer paper.

b

Discuss the importance of flowchart and pseudocode in designing algorithm.

5 marks

Answer

Sign in to view the complete answer paper.

OR
310 marks
a

Describe the different storage classes available in C.

5 marks

Answer

Sign in to view the complete answer paper.

b

Explain various types of errors with examples.

5 marks

Answer

Sign in to view the complete answer paper.

410 marks
a

Explain how to define and use an enumeration data type in C.

4 marks

Answer

Sign in to view the complete answer paper.

b

Compare character arrays and string literals. How are strings handled as arrays of characters in C?

6 marks

Answer

Sign in to view the complete answer paper.

OR
510 marks
a

Describe the process of creating and initializing a one-dimensional array. Give an example.

6 marks

Answer

Sign in to view the complete answer paper.

b

Discuss the use of pointers in self-referential structures.

4 marks

Answer

Sign in to view the complete answer paper.

610 marks
a

Write a C program to check the end-of-file condition using the feof function.

5 marks

Answer

Sign in to view the complete answer paper.

b

Compare and contrast the #ifdef and #ifndef directives in C.

5 marks

Answer

Sign in to view the complete answer paper.

OR
710 marks
a

Differentiate between text and binary file modes in C.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write a program to append data to an existing text file in C.

5 marks

Answer

Sign in to view the complete answer paper.

8

Describe memory allocation and de-allocation using malloc() and free() functions. Write suitable example program.

10 marks

Answer

Sign in to view the complete answer paper.

OR
910 marks
a

Explain call by reference mechanism with an example.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write a C program to calculate the factorial of a given number using recursion.

5 marks

Answer

Sign in to view the complete answer paper.

10

Explain the binary search algorithm in detail. Provide an example.

10 marks

Answer

Sign in to view the complete answer paper.

OR
11

Explain the key steps involved in the Insertion sort algorithm with an example.

10 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the solved question paper with answers of PROGRAMMING FOR PROBLEM SOLVING from JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD for B.Tech MME-MMT I Year I-I, January/February - 2024, R22.

For the question paper without answers, switch to the Question Paper tab.

Other papers in PROGRAMMING FOR PROBLEM SOLVING

Loading Question Papers

Fetching data from database...