JNTU

JNTU B.Tech I PROGRAMMING FOR PROBLEM SOLVING Previous Question Paper (March/April - 2023 - R18)

B.Tech | I | I-I | R18 | March/April - 2023

Answer PaperPaper Code: 151ACMaximum 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

1a

Define a Flow chart.

2 marks

Answer

A flowchart is a graphical or diagrammatic representation of an algorithm or a step-by-step process used to solve a specific problem. It illustrates the sequence of operations, decisions, and data flow within a program using standardized geometric symbols connected by directional arrows.

Key characteristics include:

  • Standardized Symbols: Utilizes specific shapes such as ovals for start/end points, parallelograms for input/output, rectangles for processing steps, and diamonds for decision-making.
  • Visual Clarity: Provides a clear, high-level overview of the logic flow, making it easier to identify potential errors or bottlenecks before writing the actual source code.
  • Communication Tool: Serves as an effective medium for documenting program logic, allowing developers to communicate complex algorithms to others in a language-independent manner.
1b

How to declare a variable?

3 marks

Answer

In C programming, declaring a variable involves specifying its data type followed by its identifier (name) and terminating the statement with a semicolon. This process informs the compiler about the amount of memory to allocate and the type of data the variable will store.

The general syntax is:

data_type variable_name;

Key points regarding variable declaration:

  • Data Type: Defines the nature of the data (e.g., int for integers, float for floating-point numbers, char for characters).
  • Identifier: The name assigned to the memory location. It must follow C naming conventions (must start with a letter or underscore, cannot be a keyword).
  • Multiple Declaration: Variables of the same type can be declared in a single line by separating them with commas, such as int x, y, z;.
  • Initialization: A variable can be assigned an initial value during declaration, known as initialization, for example: int age = 20;.
1c

How the pointer variable declared?

2 marks

Answer

Sign in to view the complete answer paper.

1d

What do you mean by array of pointers?

3 marks

Answer

Sign in to view the complete answer paper.

1e

Difference between undef and ifndef.

2 marks

Answer

Sign in to view the complete answer paper.

1f

Write the use of rewind function.

3 marks

Answer

Sign in to view the complete answer paper.

1g

Define formal arguments.

2 marks

Answer

Sign in to view the complete answer paper.

1h

Write the syntax of malloc () function.

3 marks

Answer

Sign in to view the complete answer paper.

1i

What do you mean by time complexity?

2 marks

Answer

Sign in to view the complete answer paper.

1j

Define the best-case performance of an algorithm.

3 marks

Answer

Sign in to view the complete answer paper.

Part B

210 marks
a

Write a detailed note on creating and running the program.

5 marks

Answer

Sign in to view the complete answer paper.

b

Devise an algorithm sum of n numbers using while and for loop.

5 marks

Answer

Sign in to view the complete answer paper.

OR
310 marks
a

Discuss about decision making statements with example.

5 marks

Answer

Sign in to view the complete answer paper.

b

What is an Algorithm? Write an algorithm to find the largest of 3 numbers.

5 marks

Answer

Sign in to view the complete answer paper.

410 marks
a

Explain the following functions with an example. i) strcat ii) strcpy

5 marks

Answer

Sign in to view the complete answer paper.

b

Write a C program to insert a sub-string in to a given main string from a given position.

5 marks

Answer

Sign in to view the complete answer paper.

OR
510 marks
a

Explain array of structure with an example.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write a program to find the multiplication of two matrices(size of matrix 2×2).

5 marks

Answer

Sign in to view the complete answer paper.

610 marks
a

List the various differences between binary file and text file.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write a C program which copies one file to another, replacing all lowercase characters with their uppercase equivalents.

5 marks

Answer

Sign in to view the complete answer paper.

OR
7

Explain in detail file handling functions with example each.

10 marks

Answer

Sign in to view the complete answer paper.

810 marks
a

Discuss the type of functions based on parameters and return type.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write a program in C using functions to swap two numbers using global variables concept and call by reference concept.

5 marks

Answer

Sign in to view the complete answer paper.

OR
910 marks
a

Explain the various differences between user defined and library functions.

5 marks

Answer

Sign in to view the complete answer paper.

b

What is recursion? What are the advantages and disadvantages of recursion?

5 marks

Answer

Sign in to view the complete answer paper.

1010 marks
a

Explain the technique Insertion sort with the help of an example array.

5 marks

Answer

Sign in to view the complete answer paper.

b

Describe the linear search algorithm with an example. Find the time complexity of it in all cases.

5 marks

Answer

Sign in to view the complete answer paper.

OR
1110 marks
a

Discuss binary search algorithm with an example.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write an algorithm to find the sum of all elements in an array and find the time complexity of it.

5 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 JNTU for B.Tech AI AND ML I I-I, March/April - 2023, R18.

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...