Jawaharlal Nehru Technological University Hyderabad

Jawaharlal Nehru Technological University Hyderabad B.Tech I COMPUTER PROGRAMMING IN C Previous Question Paper (September/October - 2021 - R16)

B.Tech | I | I-I | R16 | September/October - 2021

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

Answer any five questions. All questions carry equal marks.

Main

115 marks
a

Describe various number systems.

7 marks

Answer

Number systems are techniques to represent numbers in a computer architecture. The primary systems are:

  1. Decimal Number System: Base 10 system using digits 0-9. It is the standard system for human communication.
  2. Binary Number System: Base 2 system using digits 0 and 1. It is the fundamental language of digital computers, where bits represent the presence or absence of electrical signals.
  3. Octal Number System: Base 8 system using digits 0-7. It is often used as a shorthand for binary, as each octal digit represents exactly three binary bits.
  4. Hexadecimal Number System: Base 16 system using digits 0-9 and letters A-F (representing 10-15). It is widely used in low-level programming and memory addressing because it represents four binary bits per digit, making it more compact than binary.
b

Draw a flowchart for finding first N prime numbers.

8 marks

Answer

The flowchart for finding the first N prime numbers follows these logical steps:

  1. Start.
  2. Read the input N (number of primes required).
  3. Initialize count = 0 (number of primes found) and num = 2 (the first candidate number).
  4. Check if count is less than N. If no, go to Stop.
  5. If yes, check if num is prime:
    • Initialize divisor = 2 and flag = true.
    • While divisor is less than or equal to the square root of num:
      • If num modulo divisor is 0, set flag = false and break.
      • Increment divisor.
  6. If flag is true, print num and increment count.
  7. Increment num by 1 and return to step 4.
  8. Stop.
215 marks
a

Discuss various applications of arrays.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write a program to read two matrices [m × p with p × n] multiply and display the result [m × n] in matrix form.

10 marks

Answer

Sign in to view the complete answer paper.

315 marks
a

Is dynamic memory management possible without pointers? Justify your answer.

7 marks

Answer

Sign in to view the complete answer paper.

b

What operators are applicable to pointers? Why is the restriction?

8 marks

Answer

Sign in to view the complete answer paper.

415 marks
a

With an example explain the benefit of union over structure.

7 marks

Answer

Sign in to view the complete answer paper.

b

Write a program to demonstrate command line arguments.

8 marks

Answer

Sign in to view the complete answer paper.

515 marks
a

Write a program to perform find and replace activity on the content of a file. Read file name, string1 and string2 as command line arguments. Find String1 in the given file and replace it with String2.

8 marks

Answer

Sign in to view the complete answer paper.

b

Explain about fseek and ftell functions with an example.

7 marks

Answer

Sign in to view the complete answer paper.

615 marks
a

Explain about switch statement.

5 marks

Answer

Sign in to view the complete answer paper.

b

Explain about the storage classes with an example.

5 marks

Answer

Sign in to view the complete answer paper.

c

Discuss about logical and bitwise operators in C.

5 marks

Answer

Sign in to view the complete answer paper.

715 marks
a

Explain about the array of pointers with an example.

5 marks

Answer

Sign in to view the complete answer paper.

b

Write a program for implementation of pointers to pointers.

10 marks

Answer

Sign in to view the complete answer paper.

815 marks
a

Differentiate between text and binary files with an example.

7 marks

Answer

Sign in to view the complete answer paper.

b

Explain the self referential structures with an example.

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 Jawaharlal Nehru Technological University Hyderabad for B.Tech CE I I-I, September/October - 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...