JNTU

JNTU B.Tech I COMPUTER PROGRAMMING IN C Previous Question Paper (July/ August - 2021 - R16)

B.Tech | I | I-II | R16 | July/ August - 2021

Answer PaperPaper Code: 132ADMaximum Marks: 75Time: 3 Hours

Answer any five questions

All questions carry equal marks

Main

115 marks
a

What are the steps in program development?

7 marks

Answer

The program development life cycle consists of several systematic steps to ensure the creation of reliable and efficient software:

  1. Problem Definition: Clearly defining the problem to be solved and identifying the requirements and constraints.
  2. Algorithm/Flowchart Design: Developing a logical step-by-step procedure or a visual representation of the program flow.
  3. Coding: Translating the algorithm into a high-level programming language such as C.
  4. Compilation and Linking: Converting the source code into machine-readable object code and linking necessary libraries.
  5. Testing and Debugging: Executing the program with various test cases to identify and fix syntax, logical, or runtime errors.
  6. Documentation: Creating manuals and internal code comments to explain the program's functionality for future maintenance.
  7. Maintenance: Updating and improving the program over time to meet changing requirements or fix newly discovered issues.
b

Write an algorithm to check whether a given number is prime or not.

8 marks

Answer

To determine if a number n is prime, follow these steps:

  1. Start.
  2. Read the input number n.
  3. If n ≤ 1, display "Not Prime" and go to step 9.
  4. Initialize a variable i = 2.
  5. Set a flag isPrime = true.
  6. While i ≤ (n / 2):
    a. If n % i == 0, set isPrime = false and break the loop.
    b. Increment i by 1.
  7. If isPrime is true, display "Prime Number".
  8. Else, display "Not a Prime Number".
  9. Stop.
2

What are the various data types? Give its size and the need for type casting.

15 marks

Answer

Sign in to view the complete answer paper.

315 marks
a

What are the four storage classes? Discuss their scope rules.

8 marks

Answer

Sign in to view the complete answer paper.

b

How upward communication is possible among functions?

7 marks

Answer

Sign in to view the complete answer paper.

415 marks
a

Draw a flowchart for bubble sort.

8 marks

Answer

Sign in to view the complete answer paper.

b

How to pass an array, an element of an array as a parameter to a function?

7 marks

Answer

Sign in to view the complete answer paper.

5

What is meant by dynamic memory management? How C language supports programmers in memory management? Explain with relevant code segments.

15 marks

Answer

Sign in to view the complete answer paper.

615 marks
a

Write a C program for converting an array of alphabet from lowercase to uppercase.

8 marks

Answer

Sign in to view the complete answer paper.

b

Write a C program to illustrate the use of indirection operator to access the value pointed by a pointer.

7 marks

Answer

Sign in to view the complete answer paper.

715 marks
a

Is union preferred over structures by good programmers? Justify your answer.

7 marks

Answer

Sign in to view the complete answer paper.

b

What is the need of enumerated data types?

8 marks

Answer

Sign in to view the complete answer paper.

815 marks
a

Differentiate between text files and binary files.

7 marks

Answer

Sign in to view the complete answer paper.

b

Demonstrate the use of fread() and fclose() functions.

8 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the solved question paper with answers of COMPUTER PROGRAMMING IN C from JNTU for B.Tech CSE I I-II, July/ August - 2021, R16.

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

Other papers in COMPUTER PROGRAMMING IN C

Loading Question Papers

Fetching data from database...