JNTU

JNTU B.Tech I COMPUTER PROGRAMMING Previous Question Paper (June - 2022 - R13)

B.Tech | I | I | R13 | June - 2022

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

Answer any five questions

All questions carry equal marks

Main

115 marks
a

List out various steps involved in creating and running a program.

7 marks

Answer

The process of creating and executing a C program involves several sequential stages:

  1. Writing the Source Code: Using a text editor, the programmer writes the code in C language and saves it with a .c extension.
  2. Preprocessing: The preprocessor handles directives like #include and #define, replacing them with actual code or header file contents.
  3. Compilation: The compiler translates the preprocessed source code into assembly language or machine-level object code (.obj or .o file).
  4. Linking: The linker combines the object code with necessary library functions (like printf or scanf) to create an executable file (.exe).
  5. Loading and Execution: The loader brings the executable file into the computer's memory (RAM), and the CPU executes the instructions.
b

Elaborate different types of tokens in C in detail with examples.

8 marks

Answer

Tokens are the smallest individual units of a C program. They are categorized into the following types:

  • Keywords: Predefined, reserved words with special meanings. Examples:
    int, float, if, else, while
  • Identifiers: Names given to variables, functions, or arrays. Examples:
    sum, total_marks, calculateArea
  • Constants: Fixed values that do not change during execution. Examples:
    10, 3.14, 'A', "Hello"
  • Strings: A sequence of characters enclosed in double quotes. Example:
    "Welcome to C"
  • Operators: Symbols used to perform arithmetic, logical, or relational operations. Examples:
    +, -, *, ==, &&
  • Special Symbols: Characters used for specific structural purposes. Examples:
    { }, [ ], ( ), ;, ,
215 marks
a

Discuss about nested if statements with an example.

7 marks

Answer

Sign in to view the complete answer paper.

b

Explain for, while and do-while loops in detail.

8 marks

Answer

Sign in to view the complete answer paper.

315 marks
a

What is a function? What is meant by call-by value and call-by reference?

7 marks

Answer

Sign in to view the complete answer paper.

b

List out the different types of storage classes with valid example.

8 marks

Answer

Sign in to view the complete answer paper.

415 marks
a

Discuss about preprocessor directives in C and explain with example.

7 marks

Answer

Sign in to view the complete answer paper.

b

Write a C program to multiply two matrices of different order.

8 marks

Answer

Sign in to view the complete answer paper.

515 marks
a

With proper examples explain different arithmetic operations on pointers.

7 marks

Answer

Sign in to view the complete answer paper.

b

Write a C program to read a set of strings and sort them in alphabetical order.

8 marks

Answer

Sign in to view the complete answer paper.

615 marks
a

Explain declaration and initialization of array of strings.

7 marks

Answer

Sign in to view the complete answer paper.

b

Write a C program to find whether a given string is palindrome or not.

8 marks

Answer

Sign in to view the complete answer paper.

715 marks
a

Explain the following: i) Nested structures ii) Array of structures.

7 marks

Answer

Sign in to view the complete answer paper.

b

Write a C program to display the contents of the file in reverse order.

8 marks

Answer

Sign in to view the complete answer paper.

815 marks
a

Explain binary search method. Illustrate binary search on {2, 11, 15, 17, 19, 21, 25} and search for elements 24 and 17.

7 marks

Answer

Sign in to view the complete answer paper.

b

Define Sorting. Explain bubble sort method with a program and 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 from JNTU for B.Tech MECT-MCT-MEM I I, June - 2022, R13.

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

Other papers in COMPUTER PROGRAMMING

Loading Question Papers

Fetching data from database...