JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech I Year COMPUTER PROGRAMMING Previous Question Paper (July - 2021 - R13)

B.Tech | I Year | I-I | R13 | July - 2021

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

Answer any five questions. All questions carry equal marks.

Main

115 marks
a

Write a program to find whether the given number is palindrom or not.

8 marks

Answer

A palindrome number is a number that remains the same when its digits are reversed. The logic involves extracting each digit using the modulo operator and building the reversed number.

#include <stdio.h>
int main() {
    int n, reversed = 0, remainder, original;
    printf("Enter an integer: ");
    scanf("%d", &n);
    original = n;
    while (n != 0) {
        remainder = n % 10;
        reversed = reversed * 10 + remainder;
        n /= 10;
    }
    if (original == reversed)
        printf("%d is a palindrome.", original);
    else
        printf("%d is not a palindrome.", original);
    return 0;
}
b

Explain the usage of break, continue and goto statements with a sample C program.

7 marks

Answer

These control flow statements alter the normal execution sequence of a program:

  • break: Terminates the nearest enclosing loop or switch statement immediately.
  • continue: Skips the remaining statements in the current iteration of a loop and jumps to the next iteration.
  • goto: Performs an unconditional jump to a labeled statement within the same function.
#include <stdio.h>
int main() {
    for (int i = 1; i <= 5; i++) {
        if (i == 2) continue; // Skips 2
        if (i == 4) break;    // Exits loop at 4
        printf("%d ", i);
    }
    goto label;
    printf("This will be skipped");
    label: printf("\nJumped to label.");
    return 0;
}
215 marks
a

Discuss about recursive functions. Write a C program to find factorial of a given number N by using recursive function.

10 marks

Answer

Sign in to view the complete answer paper.

b

What is an array? Explain how to declare an array.

5 marks

Answer

Sign in to view the complete answer paper.

315 marks
a

What is meant by array of pointers? Explain its usage with a sample C program.

6 marks

Answer

Sign in to view the complete answer paper.

b

Write a program to concatenate two strings.

9 marks

Answer

Sign in to view the complete answer paper.

415 marks
a

Explain about passing structures through pointers with a sample C-program.

8 marks

Answer

Sign in to view the complete answer paper.

b

Explain about command line argument with an example.

7 marks

Answer

Sign in to view the complete answer paper.

515 marks
a

Distinguish between selection sort and bubble sort.

7 marks

Answer

Sign in to view the complete answer paper.

b

Write a program to implement the operations of stack.

8 marks

Answer

Sign in to view the complete answer paper.

615 marks
a

Explain about different types of operators in C.

7 marks

Answer

Sign in to view the complete answer paper.

b

Write a C program to find biggest and smallest numbers from an array.

8 marks

Answer

Sign in to view the complete answer paper.

715 marks
a

Explain about the enumerated data type.

7 marks

Answer

Sign in to view the complete answer paper.

b

Explain about storage classes in C.

8 marks

Answer

Sign in to view the complete answer paper.

815 marks
a

Explain the string handling functions in C.

7 marks

Answer

Sign in to view the complete answer paper.

b

Write a program to implement the binary search.

8 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the question paper of COMPUTER PROGRAMMING from JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD for B.Tech IT I Year I-I, July - 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...