JNTU

JNTU B.Tech I Year COMPUTER PROGRAMMING Previous Question Paper (September/October - 2021 - R13)

B.Tech | I Year | I-I | R13 | September/October - 2021

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

Answer any five questions. All questions carry equal marks.

Main

115 marks
a

List and explain various computer languages in detail.

8 marks

Answer

Computer languages are categorized based on their proximity to machine hardware and their abstraction level:

  1. Machine Language: The lowest-level language consisting entirely of binary digits (0s and 1s). It is directly executable by the CPU but is machine-dependent and extremely difficult for humans to write or debug.
  2. Assembly Language: A low-level language that uses mnemonic codes (like MOV, ADD, SUB) to represent machine instructions. It requires an assembler to translate code into machine language and provides direct control over hardware resources.
  3. High-Level Languages: Languages designed for human readability, using English-like syntax. They are machine-independent and require a compiler or interpreter to translate code into machine-executable form. Examples include C, C++, Java, and Python.
  4. Fourth-Generation Languages (4GL): Designed to reduce programming effort by focusing on 'what' to do rather than 'how' to do it. These are often used in database management and report generation, such as SQL.
b

Write a ‘C’ program to find whether the given number is prime or not.

7 marks

Answer

The following C program determines if a given integer is a prime number by checking for divisors from 2 up to the square root of the number:

#include <stdio.h>
#include <math.h>

int main() {
    int n, i, isPrime = 1;
    printf("Enter a positive integer: ");
    scanf("%d", &n);

    if (n <= 1) isPrime = 0;
    else {
        for (i = 2; i <= sqrt(n); i++) {
            if (n % i == 0) {
                isPrime = 0;
                break;
            }
        }
    }

    if (isPrime) printf("%d is a prime number.\n", n);
    else printf("%d is not a prime number.\n", n);
    return 0;
}
215 marks
a

What is recursion? Explain the limitations of recursion.

8 marks

Answer

Sign in to view the complete answer paper.

b

Explain the representation and Indexing of Multi-dimensional array.

7 marks

Answer

Sign in to view the complete answer paper.

315 marks
a

What is pointer? Describe pointer for inter function communication.

7 marks

Answer

Sign in to view the complete answer paper.

b

How to pass an array to function? Explain with example.

8 marks

Answer

Sign in to view the complete answer paper.

415 marks
a

What is a structure? Explain how it differs from arrays.

7 marks

Answer

Sign in to view the complete answer paper.

b

Explain in detail about the file Input /Output functions.

8 marks

Answer

Sign in to view the complete answer paper.

515 marks
a

Explain Selection sort algorithm with an example.

10 marks

Answer

Sign in to view the complete answer paper.

b

Explain the applications of queue.

5 marks

Answer

Sign in to view the complete answer paper.

615 marks
a

What is a Selection Statement? Explain various selection statements in ‘C’ Language with suitable examples.

8 marks

Answer

Sign in to view the complete answer paper.

b

Write a ‘C’ program for Addition of two given matrices.

7 marks

Answer

Sign in to view the complete answer paper.

7

List and explain various String Manipulation functions with example.

15 marks

Answer

Sign in to view the complete answer paper.

815 marks
a

Write a program to insert and delete an element from singly linked list.

10 marks

Answer

Sign in to view the complete answer paper.

b

Differentiate between structure and union.

5 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the question paper of COMPUTER PROGRAMMING from JNTU for B.Tech ME I Year I-I, September/October - 2021, R13.

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