Previous year paper

THEORY EXAMINATION (SEM–II) 2016-17 COMPUTER PROGRAMMING

Computer Science B.Tech 0 downloads

About this previous year paper

This document contains the full B.Tech / Diploma – Computer Programming in C semester examination paper, designed for 100 marks with a duration of 3 hours. The question paper evaluates a student’s understanding of the fundamentals of C programming, including algorithms, flowcharts, loops, recursion, functions, pointers, arrays, matrices, file handling, memory allocation, and preprocessor directives.
The paper is divided into three major sections: A, B, and C, ensuring a balanced approach toward conceptual clarity, programming logic, algorithmic thinking, and hands-on coding skills.

SECTION – A (Short Answer Questions – 10 × 2 = 20 Marks)

This section consists of ten short questions, each aimed at testing core C concepts and definitions required for strong programming foundations. Topics include:

Storage classes of C variables (auto, static, extern, register)

Purpose of do-while loop and when it is preferred

Concept of top-down development and stepwise refinement

Meaning and use of break and continue statements

Understanding of recursion and recursive functions

Difference between function declaration and function definition

Explanation of flowcharts and standard flowchart symbols

Algorithm to find the greatest of three numbers

Meaning of call-by-value with an example

Definition and usage of Macros in C

These questions check whether a student understands basic definitions, syntax rules, and logic-building concepts of C programming.

SECTION – B (Programming & Analytical Questions – 5 × 10 = 50 Marks)

Students are required to attempt any five out of eight questions. This section focuses on writing programs, understanding memory concepts, differentiating between types of arguments, and applying logic using conditional statements and loops.

Key topics include:

Flowchart vs Algorithm

Explaining differences with examples and applications.

Pointers

Definition of pointers and writing a program to swap two variables using pointers.

Actual Arguments vs Formal Arguments

Clear differentiation with examples of functions.

Switch Statement Program

Writing a program to print number of days (usually based on month number).

Matrix Operations

Printing diagonal elements of a matrix.

Recursion

Writing a recursive Fibonacci series program.

Pattern Printing

Generating a star (*) pattern using nested loops.

Sorting Names

Writing a program to arrange names in ascending order.

This section tests logic building, coding skills, use of loops, recursion, pointers, conditional statements, and simple data manipulation.

SECTION – C (Long Answer Questions – 2 × 15 = 30 Marks)

Students must attempt any two of the three long questions. These questions involve advanced concepts, full coding solutions, and detailed explanations.

Q3 – File Handling in C

Explanation of all file opening modes (r, w, a, r+, w+, a+, rb, wb, etc.)

Writing a complete C program to:

Read student records (name + age) from a file

Sort them alphabetically by name

Display sorted output

This evaluates file processing, data handling, and string manipulation.

Q4 – Advanced Concepts

Short notes on:

Dynamic memory allocation (malloc, calloc, realloc, free)

Command-line arguments (argc, argv and their use in real programs)

This tests understanding of memory management and real-world program execution.

Q5 – Macros & Series Calculation

Writing a macro with arguments to calculate simple interest and amount

Writing a C program to compute the sum of the series:

  • 11!+22!+33!+…\frac{1}{1!} + \frac{2}{2!} + \frac{3}{3!} + \dots1!1​+2!2​+3!3​+…

(first 7 terms) using a for loop

This checks preprocessor knowledge, looping, mathematical calculations, and factorial applications.

TypePrevious year paper
SubjectComputer Science
Board / courseB.Tech
FilePDF · 99.17 KB
Shared by SuGanta International

Added by the SuGanta team.