0% found this document useful (0 votes)
2 views35 pages

Pps Course File Documents

This document outlines the course file for the Programming for Problem Solving (BCS101) subject for the B.Tech first-year students for the session 2026-27. It includes the evaluation scheme, syllabus, detailed lecture plan, and a list of required documents for course completion. Additionally, it provides a breakdown of lab assignments and theoretical examination structure for the course.

Uploaded by

radhash181481
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views35 pages

Pps Course File Documents

This document outlines the course file for the Programming for Problem Solving (BCS101) subject for the B.Tech first-year students for the session 2026-27. It includes the evaluation scheme, syllabus, detailed lecture plan, and a list of required documents for course completion. Additionally, it provides a breakdown of lab assignments and theoretical examination structure for the course.

Uploaded by

radhash181481
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

A COURSE FILE

FOR

SESSION 2026-27
PROGRAMMING FOR PROBLEM SOVING
BCS101
[Link] FIRST YEAR COMMON TO ALL BRANCHES

SUBMITTED BY
ROHIT RAHAT MASIH
(ASSISTANT PROFESSOR CSE DEPT.)
COURSE FILE EVALUATION SCHEME

SESSION 2026-27 (ODD SEMESTERS)

NAME OF THE SUBJECT: PROGRAMMING FOR PROBLEM SOLVING


SUBJECT CODE:BCS 101/202

COURSE:[Link] YEAR: FIRST BRANCH: SEMESTER:

S. No. NAME OF THE DOCUMENTS % %


COMPLETION COMPLETION
OF COURSE OF COURSE
FILE FILE TILL
DATE
1. Evaluation Scheme of a Class 2%
(Issued by Affiliated University / Board)
2. Syllabus of the Subject 2%
(Issued by Affiliated University / Board)
3. Detailed Lecture Plane of the Subject Concerned 2%

4. Time-Table 2%
(Issued By Class Coordinator/ HOD/Associate
Director/Director)
5. List of Registered Students in a Particular Class with 2%
Enrolment Numbers
6. Previous Years Question Papers 5%
(At least Recent Three Consecutive Years)
7. Hand-Written Lecture Notes of the Subject 30%
( Topic-Wise and Unit-wise)
8. Tutorials given to Students 30%
(Unit-wise)
(At least 10 Tutorials per Subject/ Semester)
9. Question Bank Prepared by the Teacher Concerned (Unit- 10%
wise)
10. Solution of CT-1, CT-2 and PUT/PBT Papers 15%

Final % Completion of Course File Till Date 100%

Signature and Name of the Faculty Member


B. Tech. First Year, Semester- I
(All Branches except Agriculture Engineering and Biotechnology)

3- WEEKS STUDENT INDUCTION PROGRAMME


in the beginning of the session
Evaluation Scheme

Sessional (SW)

End Semester
Examination
Category
Sessional

(TS/PS)

(ESE)
SN Subject Subject Period Total Credit

Type
Component
Code Name

L T P CT TA CT+TA TE/PE SW+ESE Cr

1. BAS101/ Engineering Physics/ T BS 3 1 0 20 10 30 70 100 4


BAS102 Engineering Chemistry
2. BAS103 Engineering T BS 3 1 0 20 10 30 70 100 4
Mathematics-I
3. BEE101/ Fundamentals of T ES 2 1 0 20 10 30 70 100 3
BEC101 Electrical Engineering/
Fundamentals of
Electronics Engineering
4. BCS101/ Programming for T ES 2 1 0 20 10 30 70 100 3
BME101 Problem Solving/
Fundamentals of
Mechanical Engineering
5. BAS104/ Environment and T BS/ 3 0 0 20 10 30 70 100 3
BAS105 Ecology/ Soft Skills HS
6. BAS151/ Engineering Physics P BS 0 0 3 - 50 50 50 100 1
BAS152 Lab/ Engineering
Chemistry Lab
7. BEE151/ Basic Electrical P ES 0 0 3 - 50 50 50 100 1
BEC151 Engineering Lab/ Basic
Electronics Engineering
Lab
8. BCS151/ Programming for P ES/ 0 0 3 - 50 50 50 100 1
BAS155 Problem Solving Lab/ HS
English Language Lab
9. BCE151 Engineering Graphics & P ES 0 1 3 - 50 50 50 100 2
/ Design Lab/ Workshop
BWS151 Practice Lab
13 5 12 350 550 900 22

Abbreviation Used:
BS: Basic Science Course
ES: Engineering Science Course
HS: Humanities and Social Science Course
VA: Value Added Course

Page 2 of 40
BCS101 / BCS201: PROGRAMMING FOR PROBLEM SOLVING

Contact
Content Hours
8
Unit -1:
Introduction to Components of a Computer System: Memory, Processor, I/O
Devices, Storage, Operating System, Concept of Assembler, Compiler, Interpreter,
Loader and Linker.
Idea of Algorithm: Representation of Algorithm, Flowchart, Pseudo Code with
Examples, From Algorithms to Programs, Source Code.
Programming Basics: Structure of C Program, Writing and Executing the First C
Program, Syntax and Logical Errors in Compilation, Object and Executable Code.
Components of C Language. Standard I/O in C , Fundamental Data types, Variables
and Memory Locations, Storage Classes.
8
Unit-2:
Arithmetic Expressions and Precedence : Operators and Expression Using
Numeric and Relational Operators, Mixed Operands, Type Conversion, Logical
Operators, Bit Operations, Assignment Operator, Operator precedence and
Associatively.
Conditional Branching: Applying if and Switch Statements, Nesting if and Else
and Switch.
8
Unit-3:
Iteration and Loops: Use of While, do While and for Loops, Multiple Loop
Variables, Use of Break , Goto and Continue Statements.
Arrays: Array Notation and Representation, Manipulating Array Elements, using
Multi Dimensional Arrays. Character Arrays and Strings, Structure, union,
Enumerated Data types, Array of Structures, Passing Arrays to Functions.
8
Unit-4:
Functions: Introduction, Types of Functions, Functions with Array, Passing
Parameters to Functions, Call by Value, Call by Reference, Recursive Functions.
Basic of searching and Sorting Algorithms: Searching & Sorting Algorithms (
Linear Search , Binary search , Bubble Sort, Insertion and Selection Sort)
8
Unit-5:
Pointers: Introduction, Declaration, Applications, Introduction to Dynamic Memory
Allocation (Malloc, Calloc, Realloc, Free), String and String functions , Use of Pointers
in Self-Referential Structures, Notion of Linked List (No Implementation)
File Handling: File I/O Functions, Standard C Preprocessors, Defining and Calling
Macros and Command-Line Arguments.

Page 17 of 40
BCS151 / BCS251: PROGRAMMING FOR PROBLEM SOLVING
LAB

1. WAP that accepts the marks of 5 subjects and finds the sum and percentage marks
obtained
by the student.
2. WAP that calculates the Simple Interest and Compound Interest. The Principal,
Amount, Rate
of Interest and Time are entered through the keyboard.
3. WAP to calculate the area and circumference of a circle.
4. WAP that accepts the temperature in Centigrade and converts into Fahrenheit using the
formula C/5=(F-32)/9.
5. WAP that swaps values of two variables using a third variable.
6. WAP that checks whether the two numbers entered by the user are equal or not.
7. WAP to find the greatest of three numbers.
8. WAP that finds whether a given number is even or odd.
9. WAP that tells whether a given year is a leap year or not.
10. WAP that accepts marks of five subjects and finds percentage and prints grades
according to the following criteria:
Between 90-100%-----Print ‘A’
80-90%-----------------Print ‘B’
60-80%-----------------Print ‘C’
Below 60%-------------Print ‘D’
11. WAP that takes two operands and one operator from the user, perform the operation,
and prints the result by using Switch statement.
12. WAP to print the sum of all numbers up to a given number.
13. WAP to find the factorial of a given number.
14. WAP to print sum of even and odd numbers from 1 to N numbers.
15. WAP to print the Fibonacci series.
16. WAP to check whether the entered number is prime or not.
17. WAP to find the sum of digits of the entered number.
18. WAP to find the reverse of a number.
19. WAP to print Armstrong numbers from 1 to 100.
20. WAP to convert binary number into decimal number and vice versa.
21. WAP that simply takes elements of the array from the user and finds the sum of these
elements.
22. WAP that inputs two arrays and saves sum of corresponding elements of these arrays in
a third array and prints them.
23. WAP to find the minimum and maximum element of the array.
24. WAP to search an element in a array using Linear Search.
25. WAP to sort the elements of the array in ascending order using Bubble Sort technique.
Page 32 of 40
26. WAP to add and multiply two matrices of order nxn.
27. WAP that finds the sum of diagonal elements of a mxn matrix.
[Link] to implement strlen (), strcat (),strcpy () using the concept of Functions.
29. Define a structure data type TRAIN_INFO. The type contain Train No.: integer type
Train name: string Departure Time: aggregate type TIME Arrival Time: aggregate type
TIME Start station: string End station: string The structure type Time contains two
integer members: hour and minute. Maintain a train timetable and implement the
following operations:
a. List all the trains (sorted according to train number) that depart from a particular
section.
b. List all the trains that depart from a particular station at a particular time.
c. List all he trains that depart from a particular station within the next one hour of
a given time.
d. List all the trains between a pair of start station and end station.
30. WAP to swap two elements using the concept of pointers.
31. WAP to compare the contents of two files and determine whether they are same or not.
32. WAP to check whether a given word exists in a file or not. If yes then find the number of
times it occurs.
Note:
a) The Instructor may add/delete/modify/tune experiments, wherever he/she feels in a justified
manner
b) The subject teachers are suggested to use the concept of project based learning. The subject
teacher may giver certain use cases/case studies where student is able to apply multiple
concepts in one single program
c) It is also suggested that open source tools should be preferred to conduct the lab. Some open
source online compiler to conduct the C lab are as follows:

 [Link]
 [Link]
 [Link]
 [Link]

Mapping with Virtual Lab

Name of the Lab Name of the Experiment


Numerical Representation
Beauty of Numbers
More on Numbers
Factorials
String Operations
Problem Solving Lab
Recursion
Advanced Arithmatic
Searching and Sorting
Permutation
Sequences

Page 33 of 40
Printed Pages: 3 Sub Code: BCS101
Paper Id: 233201 Roll No.

[Link].
(SEM-I) THEORY EXAMINATION 2022-23
PROGRAMMING FOR PROBLEM SOLVING
Time: 3 Hours Total Marks: 70
le;% 03 ?[Link] [Link]% 70
Note:
1. Attempt all Sections. If require any missing data; then choose suitably.
2. The question paper may be answered in Hindi Language, English Language or
in the mixed language of Hindi and English, as per convenience.
uksV% 1- lHkh iz”uks dk mRrj nhft,A fdlh iz”u esa] vko”;d MsVk dk mYys[k u gksus dh
fLFkfr esa mi;qDr MsVk Lor% ekudj iz”u dks gy djsaA
2- iz”uksa dk mRrj nsus gsrq lqfo/kkuqlkj fgUnh Hkk’kk] vaxzsth Hkk’kk vFkok fganh ,oa vaxzsth
dh fefJr Hkk’kk dk iz;ksx fd;k tk ldrk gSA
SECTION A
1. Attempt all questions in brief. 2 x 7 = 14
fuEu lHkh iz”uksa dk la{ksi esa mRrj nhft,A

7
11
a. Draw memory hierarchical structure of a computer system.

11
कं ूटर िस म की मेमोरी ds oxhZdj.k dh vuqØfer संरचना बनाएं ।
_3

3.
b. Explain identifiers and keywords in C Language.
P2

.5
सी ल े ज म अिभ ापक (identifiers) और कीवड् स (keywords) को समझाइए।

54
3D

c. Differentiate between implicit and explicit type conversion.

.1
implicit और explicit Vkbi पांतरण (type conversion) के बीच अंतर crkb,A
P2

d. Find the output of following code written in C-Language: 32


Q

C-Language के िन िल खत कोड का आउटपुट fy[ks :


|1
3

#include<stdio.h>
:3

main()
47

{
int i=1;
:
08

for(;;)
{ printf("%d",i);
3

if(i=5)
02

break;
-2

}
03

}
e. Compare linear search and binary search in terms of complexity.
4-

क े टी (complexity) के सं दभ म लीिनयर सच (linear search) और बाइनरी सच


|2

(binary search) की तु लना कर।


f. Define the structure of a node in linked list.
िलं ड िल म नोड की सं रचना को प रभािषत कर ।
g. List out various file opening modes.
फ़ाइल खोलने के िविभ eksM dks lwphc) dhft,A

1|Page
QP23DP2_311 | 24-03-2023 08:47:33 | [Link]
SECTION B

2. Attempt any three of the following: 7 x 3 = 21


fuEu esa ls fdUgh rhu iz”uksa dk mRrj nhft,A
State desirable characteristics of an algorithm. Write an algorithm to calculate
a.
sum of digits of a number entered by user.
ए ो रथम की वां छनीय िवशेषताओं का उ ेख कीिजए। उपयोगकता ारा fn;s x;s
buiqV सं ा के अंकों के योग की गणना करने के िलए एक ए ो रथम िलख।
Define Data Types in C. Discuss basic data types in terms of memory occupied,
b.
format specifier and range.
C-Language म डे टा टाइप को प रभािषत कर। मेमोरी आव कता, ा प िविनदशक
और सीमा के सं दभ म बे िसक डे टा टाइप पर चचा कर।
Differentiate between call by value and call by reference parameter passing
c.
mechanisms using example.
पैरामीटर पािसं ग (parameter passing) ds rjhdks कॉल ckbZ वै ू (call by value )
और कॉल ckbZ रे फरस (call by reference) के बीच dk vUrj mnkgj.k lfgr
le>kb;sA
Write a program to multiply two matrices (read size and elements of matrices
d.
from the keyboard).
दो eSfVªDl को गु णा करने के िलए एक ो ाम िलख (कीबोड से मैिट के आकार और
त ों को पढ़)।

7
Discuss dynamic memory allocation. Explain calloc(), malloc(), realloc() and
11
e.

11
free() functions with suitable example.
_3

डायने िमक मेमोरी एलोकेशन (dynamic memory allocation) पर चचा कर। Explain

3.
P2

calloc(), malloc(), realloc() और free() फ़ं न को उपयु उदाहरण के साथ

.5
समझाइए।

54
3D

.1
SECTION C
P2

32
Q

3. Attempt any one part of the following: 7x1=7


|1
fuEu esa ls fdlh ,d iz”u dk mRrj nhft,A
3

Illustrate basic components of computer system with neat block diagram.


:3

(a)
Also, explain various functions of Operating System in detail.
47

LoPN आरे ख के साथ कं ूटर िस म के ekSfyd घटकों को समझाइए। साथ ही


:

ऑपरे िटं ग िस म के िविभ काय को िव ार से समझाइए।


08

Write an algorithm and draw a flow chart to check whether the number
(b)
3

entered by user is palindrome or not.


02

यूजर ारा िव सं ा पिल ोमे है या नही ं, यह जांचने के िलए flow chart बनाएं
-2

और ए ो रथम िलख ।
03

4. Attempt any one part of the following: 7x1=7


4-

fuEu esa ls fdlh ,d iz”u dk mRrj nhft,A


|2

(a) Explain various bitwise operators in C Language with help of an example.


When precedence of two operators in an expression is same, how associativity
helps in identifying which operator will be evaluated first. Illustrate it with an
example.
सी ल े ज म िविभ िबटवाइज़ ऑपरे टरों (bitwise operators) को एक उदाहरण की
सहायता से समझाइए। जब एक ं जक म दो ऑपरे टरों की पूवता (precedenc) समान
हो, तो कैसे साहचय (associativity) यह पहचानने म मदद करता है िक िकस ऑपरे टर
2|Page
QP23DP2_311 | 24-03-2023 08:47:33 | [Link]
का पहले मू ां कन िकया जाएगा। इसे एक उदाहरण ारा समझाइए।
(b) Illustrate various types of storage classes in C-Language with suitable example.
C-Language म िविभ कार के ोरे ज ासेज (storage classes) को उपयु
उदाहरण सिहत समझाइए।

5. Attempt any one part of the following: 7x1=7


fuEu esa ls fdlh ,d iz”u dk mRrj nhft,A
(a) Write a program in C to print the given pattern:
िदए गए पैटन को ि ं ट करने के िलए C म एक ो ाम िलख
*
***
*****
*******
*********
(b) Illustrate recursion. Write a program in C to find GCD (Greatest Common
Divisor) of two numbers using recursion.
पु नरावत fof/k (recursion) D;k gksrh gS] le>kb;sA पुनरावत fof/k (recursion)
का उपयोग करके दो सं ाओं का मह म समापवतक (Greatest Common Divisor)
dks Kkr djus के िलए C म एक ो ाम िलख।
6. Attempt any one part of the following: 7x1=7
fuEu esa ls fdlh ,d iz”u dk mRrj nhft,A

7
11

11
(a) Write a program in C to implement bubble sort.
_3

Øec) djus ds बबल सॉट (bubble sort) fof/k को लागू करने के िलए C म एक

3.
P2

ो ाम िलख।

.5
54
(b) Construct a structure to ‘customer’ specify data of customers in a bank. The data to
3D

be stored is: Account number, Name, Balance in account. Assume maximum of

.1
200 customers in the bank.
P2

32
Write a program in C to find and print all details of customers (i.e. Account
Q

Number, Name and Balance) having balance less than Rs. 100.
|1
बक म ाहकों के डे टा को ‘customer’ uke dk ,d structure dh रचना कर। सं हीत
िकया जाने वाला डे टा है : Account number, Name, Balance in account. बक म
3
:3

अिधकतम 200 ाहक मान ल।


47

100 पये से कम बैलस वाले ाहकों के सभी िववरण (i.e. Account Number, Name and
Balance) को ि ंट करने के िलए C म एक ो ाम िलख।.
:
08

7. Attempt any one part of the following: 7x1=7


3

fuEu esa ls fdlh ,d iz”u dk mRrj nhft,A


02

(a) What is Macro? Illustrate the working of Macro as a variable and as a function
-2

with the help of suitable example.


03

मै ो (Macro) ा gksrk है ? उपयु उदाहरण की सहायता से एक वे रएबल


4-

(variable) के प म और एक फं न (function) के प म मै ो (Macro) की


|2

काय णाली को समझाइए।


(b) Discuss various file operations. Write a program in C to read content of an
existing file and display the numbers of words and lines in that file.
फ़ाइल सं चालन esa iz;qDr gksus okys fofHkUu vkWijs”ku (file operations) पर चचा
कर। िकसी मौजूदा फ़ाइल की साम ी को पढ़ने के िलए C म एक ो ाम िलख और
उस फ़ाइल म श ों और पं यों की सं ा vkmViqV ds :Ik esa दिशत कर।

3|Page
QP23DP2_311 | 24-03-2023 08:47:33 | [Link]
Printed Page: 1 of 2
Subject Code: BCS101
0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0

BTECH
(SEM I) THEORY EXAMINATION 2023-24
PROGRAMMING FOR PROBLEM SOLVING
TIME: 3HRS [Link]: 70
Note: 1. Attempt all Sections. If require any missing data; then choose suitably.

SECTION A
1. Attempt all questions in brief. 2 x 7 = 14
Q no. Question Marks C
O
a. Define Syntax. Write the importance of Syntax in programming. 2 1
b. Draw the Memory Hierarchy according to the Access time. 2 1
c. Differentiate Between Operator and Operands. 2 2
d. Define Conditional Operator with an example. 2 2
e. Find the Output of Code: 2 3
void main ()
{
int a, b;
for (a = 6, b = 4; a <= 24; a = a + 6)
{

0
if (a % b == 0)
11

13
break;
_3

7.
printf(“%d” ,a);
P2

.6
}

45
4D

f. Write the importance of base value in recursive function. 2 4

.2
g. Predict the output of following program 2 5
P2

15
#include<stdio.h>
Q

int main()
|1

{
AM

int a = 12;
void *ptr = (int *)&a;
printf("%d", *ptr);
6
:5

getchar();
30

return 0;
}
9:

SECTION B
24

2. Attempt any three of the following: 7 x 3 = 21


20

a. Explain the Storage Classes used for the storage of the Data in C 7 1
programming
0/

b. Discuss the Concept of Type Casting and Type Conversion with the 7 2
/2

Program.
|3

c. Write a program to print the pattern 7 3

*
**
***
****
***
**
*
1|Page
[Link]
QP24DP2_311 | 3/20/2024 9:30:56 AM | [Link]
Printed Page: 2 of 2
Subject Code: BCS101
0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0

BTECH
(SEM I) THEORY EXAMINATION 2023-24
PROGRAMMING FOR PROBLEM SOLVING
TIME: 3HRS [Link]: 70
d. Write a Program to print the Fibonacci Series up to the user's choice 7 4
with the process in which the function calls itself.
e. Write the Short notes on 7 5
(i) Linked list
(ii) macros

SECTION C
3. Attempt any one part of the following: 7x1=7
a. Explain the Digital Computer with proper architecture. 7 1
b. Define Algorithm. Write the Algorithm for the greatest of three numbers 7 1
and Draw its flow chart.

4. Attempt any one part of the following: 7x1=7


a. Illustrate the Concept of Operator Precedence and Associativity with 7 2
Example.
b. Write a Program to discuss the use of break in Switch Statement. 7 2

0
11

13
5. Attempt any one part of the following: 7x1=7
_3

7.
a. Write a Program to check whether the entered number is prime or not. 7 3
P2

.6
b. Write a Program to print the multiplication of two-dimensional matrices 7 3

45
with m*n dimensions.
4D

.2
P2

6. Attempt any one part of the following: 7x1=7


15
a. Write a Program to print the greatest number of an array using the array 7 4
Q

|1

passing to function concept.


b. Define Sorting. Explain the Bubble sort technique and write the 7 4
AM

Program to implement the bubble sort.


6

7. Attempt any one part of the following: 7x1=7


:5

a. Define file. Write the modes of file handling. Write a program in C to 7 5


30

write multiple lines to a text file.


9:

b. Define calloc function. Write the Program to print the sum of elements 7 5
initialized at the dynamic memory allocated by the user.
24
20
0/
/2
|3

2|Page
QP24DP2_311 | 3/20/2024 9:30:56 AM | [Link]
[Link]
Printed Page: 1 of 3
Subject Code: BCS101
0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0

BTECH
(SEM I) THEORY EXAMINATION 2025-26
PROGRAMMING FOR PROBLEM SOLVING
TIME: 3 HRS [Link]: 70

Note: Attempt all Sections. In case of any missing data; choose suitably.

SECTION A
1. Attempt all questions in brief. 02 x 7 = 14

Q Question
CO Level
no.
a. Write the fundamental data types used in C Programming, along with their
range, byte size and format specifier.
1 K2
C प्रोग्राम िंग ें उपयोग होने वाले ूलभूत डे टा प्रकारोिं को उनकी रें ज, बाइट ाप और
प्रारूप मवमनर्दे शक के साथ मलखिए।
b Draw the memory hierarchy of a computer.
1 K1
किंप्यूटर की े ोरी पर्दानुक्र का मित्र बनाएिं ।
c. What are logical operators?
2 K1
लॉमजकल ऑपरे टर क्या होते हैं ?
d. Differentiate between implicit and explicit type conversion in C.
2 K2
C ें इखलिमसट और एक्सखिमसट टाइप कन्वजजन के बीि अिंतर स्पष्ट कीमजए।
11

32
e. Write the output of the following code:
_3

4.
#include<stdio.h>
int main() {

.3
P1

int a = 0, i = 0, b;

42
for (i = 0; i < 5; i++)
6D

9.
{
P2

a++; |4
if (i == 3)
Q

AM

break;
}
printf("%d",a);
38

return 0; }
3 K3
मनम्नमलखित कोड का आउटपुट मलखिए:
5 6:

#include<stdio.h>
8:

int main() {
int a = 0, i = 0, b;
2 6

for (i = 0;i < 5; i++)


20

{
a++;
n-

if (i == 3)
Ja

break;
}
7-

printf("%d",a);
|0

return 0; }
f. What is a recursive function? Explain with an example. 4 K2
Recursive function क्या है ? उदाहरण सहहत समझाइए।
g. List various file opening modes.
5 K3
मवमभन्न फाइल िोलने के तरीकोिं की सूिी बनाएिं ।

1|Page
QP26DP1_311 | 07-Jan-2026 8:56:38 AM | [Link]
Printed Page: 2 of 3
Subject Code: BCS101
0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0

BTECH
(SEM I) THEORY EXAMINATION 2025-26
PROGRAMMING FOR PROBLEM SOLVING
TIME: 3 HRS [Link]: 70

SECTION B
2. Attempt any three of the following: 03 x 7 = 21
a. Differentiate between compiler and interpreter. Also differentiate between
syntax error and logical error.
1 K1
किंपाइलर और इिं टरप्रेटर के बीि अिंतर स्पष्ट कीमजए। साथ ही, मसिंटैक्स त्रुमट और तामकजक
त्रुमट के बीि अिंतर भी स्पष्ट कीमजए।
b. Write an algorithm to calculate sum of digits of a number entered by the user.
उपयोगकताज द्वारा र्दजज की गई सिंख्या के अिंकोिं का योगफल ज्ञात करने के मलए एक 2 K2
एल्गोररर्द मलिें।
c. Differentiate between structure and union with suitable example.
3 K3
उपयुक्त उर्दाहरण समहत structure और union के बीि अिंतर स्पष्ट कीमजए।
d.
Differentiate between call by value and call by reference parameter passing in C
using example.
4 K4
उर्दाहरण समहत C ें कॉल बाय वैल्यू और कॉल बाय रे फरें स पैरा ीटर पामसिंग के बीि
अिंतर स्पष्ट करें ।
11
e. Explain the use of command-line arguments (argc, argv) and show with an 5 K4

32
example how to access them in C.
_3

4.
Command-line arguments (argc, argv) का उपयोग समझाइए और उदाहरण के साथ

.3
C में कैसे access हकया जाता है बताइए।
P1

42
6D

SECTION C

9.
3. Attempt any one part of the following: 07 x 1 = 07
P2

a. Discuss various storage classes used in C with examples.


|4
1 K2
उर्दाहरणोिं समहत C ें उपयोग होने वाली मवमभन्न स्टोरे ज क्लासोिं पर ििाज करें ।
Q

AM

b. Write an algorithm to find the greatest of three numbers. Also draw the
flowchart for the algorithm.
38

1 K2
तीन सिंख्याओिं ें से सबसे बडी सिंख्या ज्ञात करने के मलए एक एल्गोररर्द मलखिए। साथ
ही, एल्गोररर्द का फ्लोिाटज भी बनाइए।
5 6:
8:

4. Attempt any one part of the following: 01 x 7 = 07


6

a. Write a program to discuss the use of break in a switch case statement.


2 K3
2

खिि केस स्टे ट ेंट ें ब्रे क के उपयोग पर ििाज करने के मलए एक प्रोग्रा मलिें।
20

b. What do you mean by operator precedence and associativity in C. Explain with


n-

suitable example.
2 K3
C ें ऑपरे टर प्रेमसडें स और एसोमसएमटमवटी से आपका क्या तात्पयज है ? उपयुक्त
Ja

उर्दाहरण समहत स झाइए।


7-
|0

5. Attempt any one part of the following: 01 x 7 = 07


a. Write a program to print the following pattern in C:
****
***
**
*
3 K3
C भाषा ें मनम्नमलखित पैटनज को मप्रिंट करने के मलए एक प्रोग्रा मलिें:
****
***
**
*
2|Page
QP26DP1_311 | 07-Jan-2026 8:56:38 AM | [Link]
Printed Page: 3 of 3
Subject Code: BCS101
0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0

BTECH
(SEM I) THEORY EXAMINATION 2025-26
PROGRAMMING FOR PROBLEM SOLVING
TIME: 3 HRS [Link]: 70

b. Create a structure in C language for keeping the records of the employees of an


organization about their Name, Designation, Salary, Department and City of
posting. Write program to enter records of 100 employees and display the names
of those with salary more than 20,000.
मकसी सिंगठन के क जिाररयोिं के ना , पर्दना , वेतन, मवभाग और तैनाती शहर से 3 K3
सिंबिंमित ररकॉडज रिने के मलए C भाषा ें एक structure बनाएिं । 100 क जिाररयोिं का
ररकॉडज र्दजज करने और 20,000 से अमिक वेतन वाले क जिाररयोिं के ना प्रर्दमशजत करने
के मलए एक प्रोग्रा मलिें।

6. Attempt any one part of the following: 01 x 7 = 07


a. What is recursion? Write a program to find factorial of n numbers using
recursion.
4 K4
पुनरावतजन (recursion) क्या है ? पुनरावतजन का उपयोग करके n सिंख्याओिं का
फैक्टोररयल ज्ञात करने के मलए एक प्रोग्रा मलखिए।
b. Write a program in C to implement selection sort.
4 K4
मसलेक्शन सॉटज को लागू करने के मलए C भाषा ें एक प्रोग्रा मलिें।
11

32
7. Attempt any one part of the following: 01 x 7 = 07
_3

4.
a. Discuss dynamic memory allocation. Explain calloc(), malloc(), realloc() and

.3
P1

free() functions with suitable example.


5 K2
डायनाम क े ोरी एलोकेशन पर ििाज करें । उपयुक्त उर्दाहरण समहत calloc(),

42
6D

malloc(), realloc() और free() फिंक्शन की व्याख्या करें ।

9.
b. List out various file operations and modes in C. Write a ’C’ program to copy the
P2

content from one file to another fie.


|4
5 K3
Q

C भाषा में हिहभन्न फाइल ऑपरे शन और मोड सूचीबद्ध करें । एक C प्रोग्राम हलखें जो एक
AM

फाइल की सामग्री को दू सरी फाइल में कॉपी करे ।


38
5 6:
8:
2 6
20
n-
Ja
7-
|0

3|Page
QP26DP1_311 | 07-Jan-2026 8:56:38 AM | [Link]
Printed Page: 1 of 3
Subject Code: BCS101
0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0

BTECH
(SEM I) THEORY EXAMINATION 2024-25
PROGRAMMING FOR PROBLEM SOLVING
TIME: 3 HRS [Link]: 70

Note: Attempt all Sections. In case of any missing data; choose suitably.

SECTION A
1. Attempt all questions in brief. 2 x 07 = 14
Q no. Question CO Leve
l
a. Define Tokens and its use in Programming language. 1 K1
ो ािमंग भाषा म टोकन और उसके उपयोग को प रभािषत कर।
b. Differentiate between low level language and high-level language. 1 K2
िन रीय भाषा और उ रीय भाषा के बीच अंतर बताइए।
c. Write the significance of Operators in Programming language. 2 K1
ो ािमंग भाषा म ऑपरे टस का मह िल खए।
d. Draw the structure of Nested if else statement. 2 K2
ने े ड if else े टमट की संरचना बनाएं ।
e. Find the Output of below code: 3 K3

0
नीचे िदए गए कोड का आउटपुट खोज:

13
#include <stdio.h>
11

7.
_3
int main()

.6
{
P2

45
int z = 1;
while (z <= 5)
5D

.2
{

15
P2

if (z == 3)
{ |1
Q

z++; }
AM

printf("%d ", z);


z++;
}
0
:1

return 0;
}
02

f. Write the time complexity of Selection Sort. 4 K2


9:

चयन सॉट की समय जिटलता िलख।


5

g. Define Macros and its use in C Programming. 5 K1


02

मै ोज़ को प रभािषत कर और सी ो ािमंग म इसका उपयोग कर।


-2

SECTION B
ar

2. Attempt any three of the following: 07 x 3 = 21


M

a. Define Obj file. Discuss the Compilation process step by step in C 1 K3


5-

Programming.
|0

Obj फ़ाइल को प रभािषत कर। C ो ािमंग म संकलन ि या पर चरण दर


चरण चचा कर।
b. Write a program to check the entered year is leap year or not with 2 K3
conditional operator.
सशत ऑपरे टर के साथ दज वष लीप वष है या नहीं, इसकी जां च करने के िलए
एक ो ाम िलख।

1|Page
QP25DP2_311 | 05-Mar-2025 9:02:10 AM | [Link]
Printed Page: 2 of 3
Subject Code: BCS101
0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0

BTECH
(SEM I) THEORY EXAMINATION 2024-25
PROGRAMMING FOR PROBLEM SOLVING
TIME: 3 HRS [Link]: 70

c. Write the importance of array. Write a program to find the sum of two 3 K3
numbers using array passing to function.
ऐरे का मह िलख। फ़ं न म ऐरे पािसं ग का उपयोग करके दो सं ाओं का
योग ात करने के िलए एक ो ाम िलख।
d. Discuss the use of searching and write the program to find the number 4 K4
in an array using linear search.
खोज के उपयोग पर चचा कर तथा रै खक खोज का उपयोग करके िकसी
सारणी म सं ा ात करने के िलए ो ाम िलख।
e. Explain the use and importance of Linked list in Programming. 5 K3
ो ािमंग म िलं ड सूची के उपयोग और मह को समझाइए।

SECTION C
3. Attempt any one part of the following: 07 x 1 = 07
a. Draw and discuss the architecture of Digital Computer System and its 1 K4

0
use in programming.

13
11
िडिजटल कं ूटर िस म की वा ुकला और ो ािमंग म इसके उपयोग पर

7.
िच बनाएं और चचा कर।
_3

.6
b. Write the four storage classes used in C programming with example. 1 K3
P2

सी ो ािमंग म यु चार ोरे ज ासों को उदाहरण सिहत िल खए।

45
5D

.2
4. Attempt any one part of the following: 07 x 1 = 07

15
P2

a. Discuss the various operators used in the C programming language with 2 K4


examples. |1
Q

सी ो ािमंग भाषा म यु िविभ ऑपरे टरों पर उदाहरण सिहत चचा कर।


AM

b. Write a C program to find largest number from four given numbers. 2 K3


चार दी गई सं ाओं म से सबसे बड़ी सं ा ात करने के िलए C ो ाम िलख।
0
:1

5. Attempt any one part of the following: 07 x 1 = 07


02

a. Write a program to print the pattern 3 K3


पैटन ि ंट करने के िलए ो ाम िलख
9:

*
5

* *
02

* *
-2

* *
*************
ar

b. Write a Program to find the multiplication of two n*n matrix. 3 K3


M

दो n*n मैिट का गुणनफल ात करने के िलए एक ो ाम िलख।


5-
|0

6. Attempt any one part of the following: 07 x 1 = 07


a. Write a Program to sort the given list of data using bubble sort and 4 K4
compare its time complexity with insertion sort.
बबल सॉट का उपयोग करके डे टा की दी गई सूची को सॉट करने के िलए एक
ो ाम िलख और स लन सॉट के साथ इसकी समय जिटलता की तुलना कर।
73859246

2|Page
QP25DP2_311 | 05-Mar-2025 9:02:10 AM | [Link]
Printed Page: 3 of 3
Subject Code: BCS101
0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0

BTECH
(SEM I) THEORY EXAMINATION 2024-25
PROGRAMMING FOR PROBLEM SOLVING
TIME: 3 HRS [Link]: 70

b. Define call by reference. Write a program to swap two numbers with 4 K3


this concept.
संदभ ारा कॉल को प रभािषत कर। इस अवधारणा के साथ दो सं ाओं को
ैप करने के िलए एक ो ाम िलख।

7. Attempt any one part of the following: 07 x 1 = 07


a. Define DMA. Write a program to allocate the run time memory and find 5 K4
the sum of all the numbers entered by the user within that memory.
DMA को प रभािषत कर। रन टाइम मेमोरी आवंिटत करने और उस मेमोरी के
भीतर उपयोगकता ारा दज सभी सं ाओं का योग ात करने के िलए एक
ो ाम िलख।
b. Define Pointer. Discuss the self referential pointer with example. 5 K4
पॉइं टर को प रभािषत कर। -संदिभत पॉइं टर पर उदाहरण सिहत चचा कर।

0
13
11

7.
_3

.6
P2

45
5D

.2
15
P2

|1
Q

AM
0
:1
02
9:
5
02
-2
ar
M
5-
|0

3|Page
QP25DP2_311 | 05-Mar-2025 9:02:10 AM | [Link]
Printed Pages:03 Sub Code: BCS201
Paper Id: 238263 Roll No.

[Link]
(SEM II) THEORY EXAMINATION 2022-23
PROGRAMMING FOR PROBLEM SOLVING
Time: 3 Hours Total Marks: 70
le;% 03 ?[Link] [Link]% 70
Note:
1. Attempt all Sections. If require any missing data; then choose suitably.
2. The question paper may be answered in Hindi Language, English Language or
in the mixed language of Hindi and English, as per convenience.
uksV% 1- lHkh iz”uks dk mRrj nhft,A fdlh iz”u esa] vko”;d MsVk dk mYys[k u gksus dh
fLFkfr esa mi;qDr MsVk Lor% ekudj iz”u dks gy djsaA
2- iz”uksa dk mRrj nsus gsrq lqfo/kkuqlkj fgUnh Hkk’kk] vaxzsth Hkk’kk vFkok fganh ,oa vaxzsth
dh fefJr Hkk’kk dk iz;ksx fd;k tk ldrk gSA
SECTION A

1. Attempt all questions in brief. 2 x 7 = 14


सभी का संछेप म उ र दीिजये।
(a) Differentiate between algorithm and program.
ए गो र म और ो ाम के बीच अंतर बताइए । 11

07
(b) Discuss the functions of an operating system in brief.
_3

.1
एक ऑपरे टग िस टम के काय पर सं ेप म चचा कर।
P2

.7
(c) Write the output of following code:
िन कोड का आउटपुट िलिखए:

54
3E

.1
#include <stdio.h>
P2

int main()
{
32
Q

|1
int a = -10, b = 20;
33

if(a > 0 && b < 0)


a++;
8:

else if(a < 0 && b < 0)


:5

a--;
else if(a < 0 && b > 0)
08

b--;
else
3
02

b--;
printf("%d\n",a + b);
-2

return 0;
08

}
7-

(d) Compare linear search and binary search in terms of time complexity.
|0

टाइम को लेि सटी के संदभ म लीिनयर खोज और बाइनरी खोज क तुलना कर।
(e) Differentiate between structure and union.
चर और यूिनयन के बीच अंतर बताइए ।
(f) What do you mean by pointer arithmetic?
पॉइं टर अंकगिणत से आप या समझते ह?
(g) Discuss linked list in brief.
ल ड िल ट पर सं ेप म चचा कर।

[Link]
QP23EP2_311 | 07-08-2023 08:58:33 | [Link]
SECTION B

2. Attempt any three of the following: 7 x 3 = 21


िन म क ही तीन का उ र दीिजये ।
(a) Explain flow chart and benefits of using the flow chart in programming. Draw a flow
chart to find the sum and average of n integers.
लो चाट और ो ा मग म लो चाट का उपयोग करने के लाभ क ा या कर। n पूणाक का योग और औसत
ात करने के िलए एक लो चाट बनाएँ।

(b) Explain recursion in C. Write a program in C to find the factorial of a given number
using recursive method.
C म पुनरावत िविध क ा या क िजये। पुनरावत िविध का उपयोग करके कसी दी गई सं या के फ़ै टो रयल
ात करने के िलए C म एक ो ाम िलख।
(c) Write a program in C to reverse a given number N having any number of digits.
कसी दए गए सं या N, िजसमे कतने भी अंक ह , को reverse करने के िलए C म एक ो ाम िलख।
(d) Discuss the following string functions in C with suitable code snippet:
उपयु कोड अंश के साथ C म िन ग फ़ं शंस पर चचा कर:
i) strrev ii) strcmp iii) strcat iv) strlen v) strcpy

(e) Explain the process of using fopen() function in C with suitable examples. Also discuss
various modes of opening a file in C.
उपयु उदाहरण के साथ C म fopen() फ़ं शन का उपयोग करने क या को समझाएं। C म फ़ाइल खोलने
के िविभ modes पर भी चचा कर।
11

07
_3
SECTION C

.1
P2

.7
3. Attempt any one part of the following: 7x1=7
िन म कसी एक का उ र दीिजये ।

54
3E

.1
(a) Discuss various storage classes used in C including the details of storage place,
P2

32
default value, scope and lifetime.
भंडारण थान, िडफ़ॉ ट मान, दायरे और जीवनकाल के िववरण सिहत C म उपयोग कए जाने वाले िविभ
Q

|1
storage classes पर चचा कर।
(b) Discuss various primitive data types used in C with suitable examples including
33

their required memory size, format specifier and range.


8:

C म उपयोग कए जाने वाले िविभ ि िम टव डेटा टाइ स पर उनके आव यक मेमोरी आकार, ा प


:5

िन द कता और रज सिहत उपयु उदाहरण के साथ चचा कर।


08

4. Attempt any one part of the following: 7x1=7


3
02

िन म कसी एक का उ र दीिजये ।
-2

(a) Write a program in C to print grades as per following criteria for obtained
percentage of marks M out of 100:
08

100 म से M अंक ा करने के िलए िन िलिखत मानदंड के अनुसार ड


े मु त करने के िलए C म एक
7-

ो ाम िलख
|0

Obtained Percent Marks (M) Grade


90 <M≤ 100 A+
80 <M≤ 90 A
70 <M≤ 80 B+
60 <M≤ 70 B
50 <M≤ 60 C
M≤ 50 F

[Link]
QP23EP2_311 | 07-08-2023 08:58:33 | [Link]
(b) Explain different types of bitwise operators used in C with suitable examples. Find
the value of following expressions:
उपयु उदाहरण के साथ C म उपयोग कए जाने वाले िविभ कार के िबटवाइज ऑपरे टर क ा या
ं को का मान ात क िजये।
कर। िन िलिखत ज
i) 10 >>2 ii) 20 << 2 iii) 25 & 30 iv) 25 | 30
5. Attempt any one part of the following: 7x1=7
िन म कसी एक का उ र दीिजये ।
(a) Differentiate between while and do-while loop. Write a program in C to print the
following pattern:
while और do-while लूप के बीच अंतर कर। िन पैटन मु त करने के िलए C म एक ो ाम
िलख:
12345
1234
123
12
1
(b) Explain array in C. Write a program in C to multiply two matrices, each of order
NxN and display it on console.
C म array क ा या कर। NxN आडर के दो मै स को गुणा करने के िलए C म एक ो ाम िलख और
11

07
इसे आउटपुट के प म द शत कर।
_3

.1
6. Attempt any one part of the following: 7x1=7
P2

.7
िन म कसी एक का उ र दीिजये ।

54
3E

(a) Explain call by value and call by reference with suitable example.

.1
P2

उपयु उदाहरण के साथ call by value और call by reference को समझाइए ।

32
Q

|1
(b) Discuss sorting. Write a program in C for selection sorting.
सॉ टग पर चचा कर। िसले शन सॉ टग के िलए C म एक ो ाम िलख।
33

7. Attempt any one part of the following: 7x1=7


8:

िन म कसी एक का उ र दीिजये ।
:5
08

(a) Explain static memory allocation and dynamic memory allocation with suitable
examples.
3

थैितक मेमोरी आवंटन और गितशील मेमोरी आवंटन को उपयु उदाहरण के साथ समझाएँ।
02

(b) Discuss various file handling methods used in C in brief. Write a program in C to
-2

write some text matter into a file “[Link]” and then read this text matter and
08

display on console using file handling methods.


7-

सं ेप म C म उपयोग क जाने वाली िविभ फ़ाइल हड लग िविधय पर चचा कर। कु छ पाठ साम ी को
|0

“[Link]” फ़ाइल म िलखने के िलए C म एक ो ाम िलख और उसके उपरांत इस पाठ साम ी को


पढ़ और फ़ाइल हड लग िविधय का उपयोग करके कं सोल पर द शत कर।

[Link]

QP23EP2_311 | 07-08-2023 08:58:33 | [Link]


Printed Page: 1 of 2
Subject Code: BCS201
0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0

BTECH
(SEM II) THEORY EXAMINATION 2023-24
PROGRAMMING FOR PROBLEM SOLVING
TIME: 3 HRS [Link]: 70
Note: 1. Attempt all Sections. If require any missing data; then choose suitably.

SECTION A
1. Attempt all questions in brief. 2 x 7 = 14
Q no. Question Marks C
O
a. 1Nibble =………..Bytes. 2 1
b. Find the value of variable max in the following code: - 2 2
int a=10, b=20;
int max= (a>b)? a: b;
c. Define Explicit type conversion with suitable example. 2 2
d. Write a C program to print all natural numbers from 10 to 100. 2 3
e. Define Pointer to Pointer. 2 4
f. Find the output of following code: - 2 5
#include<stdio.h>

1
#defien a 2*2+2

.3
11
void main ()

21
{
_3

int b,c;

.2
P2

b=2/a;

19
c=b+4;
4E

.2
printf(“Value of variable b and c are %d%d respectively ”, b,c);
06
P2

}
|1
g. Draw block diagram to represent doubly linked list. 2 5
Q

AM

SECTION B
2. Attempt any three of the following: 7 x 3 = 21
05

a. What is Flowchart what are the properties of Flowchart? Draw a 7 1


flowchart to check number is a buzz number or not. (A number is said
:
01

to be Buzz if it ends with 7 or divisible by 7).


b. What is the importance of Precedence order and associativity? Explain 7 2
9:

Bitwise and Ternary operators in detail.


24

c. Write a program in C language to multiply 2 matrices of order n*n each 7 3


20

and print the resultant matrix along with the transpose of the resultant
matrix.
g-

d. Write a program in C language to implement Selection sort method. 7 4


Au

e. Write a program to delete the end of the file using function feof(). 7 5
0-

Display the file pointer position for detecting end of file.


|2

SECTION C
3. Attempt any one part of the following: 7x1=7
a. What is the different user defined data types in C language? Write 7 1
range, Format specifier, memory size of primitive data types.
b. How algorithm is different form flowchart. Write an algorithm to check 7 1
number is a Prime number or not.

1|Page
QP24EP2_311 | 20-Aug-2024 9:01:05 AM | [Link]
Printed Page: 2 of 2
Subject Code: BCS201
0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0

BTECH
(SEM II) THEORY EXAMINATION 2023-24
PROGRAMMING FOR PROBLEM SOLVING
TIME: 3 HRS [Link]: 70
4. Attempt any one part of the following: 7x1=7
a. Why break statement is required? Write a C program in C language to 7 2
check character is a vowel or consonant.
b. Write a program in C language to calculate energy bill. Read the starting 7 2
and ending meter readings. The charges are as follows: -
No. of Units Consumed rates in Rs.
0<units<=200 Rs 5.50 per Unit
200<units<=400 Rs 700 + Rs 6.0 per unit excess of 200

400<units<= 600 Rs 1400 + Rs 7.50 per unit excess of 400

600<units Rs 1850+ Rs 9.0 per Unit excess of 600

1
5. Attempt any one part of the following: 7x1=7

.3
11
a. (i) Write a program in C language to print the following pattern: - 7 3

21
1
_3

.2
4 9
P2

16 25 36

19
49 64 81 100
4E

.2
06
P2

(ii) Write a program in C language to print the sum of following series:


|1
S=1!/n! + 2!/n! + 3!/n!..........x!/n!.
Q

b. Write a program in C language using union to store name, mobile 7 3


AM

number, year of birth, fees deposited, total marks in class 12th and print
only name and marks of class 12th of those students who have deposited
05

fees less that5000 and how born after year 2005.


:
01

6. Attempt any one part of the following: 7x1=7


a. Write a C program to find the presence of any particular element in an 7 4
9:

array of n number of elements using Binary search method.


24

b. What are the different types of functions in C programming? Write a C 7 4


20

program to print the multiplication of all the digits of a number using


recursion.
g-
Au

7. Attempt any one part of the following: 7x1=7


0-

a. What are the advantages of Dynamic memory allocation over static 7 5


memory allocation? Write a program to display two numbers with
|2

malloc () and reallocate memory for displaying three numbers.


b. Define any 3 functions which are used for file handling in C language. 7 5
Write a program in C language to count total number vowels in a text
file.

2|Page
QP24EP2_311 | 20-Aug-2024 9:01:05 AM | [Link]
Printed Page: 1 of 2
Subject Code: BCS201

0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0

BTECH
(SEM II) THEORY EXAMINATION 2024-25
PROGRAMMING FOR PROBLEM SOLVING
TIME: 3 HRS [Link]: 70
Note:
1. Attempt all Sections. If require any missing data; then choose suitably.
2. The question paper may be answered in Hindi Language, English Language or in the
mixed language of Hindi and English, as per convenience.
नोट: - सभी अनुभाग ों का उत्तर दे ना अननवार्य है । र्नद नकसी प्रश्न में क ई जानकारी अनुपलब्ध ह , त
उपर्ुक्त जानकारी मानकर उत्तर दें ।
• प्रश्न पत्र का उत्तर नहों दी भाषा, अोंग्रेजी भाषा अथवा नहों दी और अोंग्रेजी के नमनित रूप में, सुनवधा
अनुसार नकसी भी भाषा में नदर्ा जा सकता है ।

SECTION A
1. Attempt all questions in brief. 02 x 7 = 14
Q Question CO Level
no.
a. . What is the difference between compiler and interpreter? 1 K2
कम्पाइलर और इों टरप्रेटर में क्या अोंतर है ?

4
11

24
b. Write a short note on flowchart and its use. 1 K2
_3

फ्ल चाटय और इसके उपर् ग पर सोंनिप्त नटप्पणी नलखिए।

7.
P1

c. Explain the purpose of the scanf() and printf() functions in C. 2 K2

.3
C में scanf() और printf() फोंक्शन ों का उद्दे श्य समझाइए।

42
5E

d. What is operator precedence? Give an example. 2 K2


ऑपरे टर प्रेसीडें स क्या ह ता है ? एक उदाहरण दीनजए।
9.
P2

|4
e. Mention the use of break and continue in loops. 3 K2
Q

लूप्स में break और continue का उपर् ग बताइए।


AM

f. Define recursion with an example. 4 K2


ररकर्यन क उदाहरण सनहत पररभानषत कीनजए।
34

g. Differentiate between malloc() and calloc(). 5 K2


:
02

malloc() और calloc() में अोंतर स्पष्ट कीनजए।


9:

SECTION B
5
02

2. Attempt any three of the following: 07 x 3 = 21


Q Question CO Level
-2

no.
ul

a. Explain various components of a computer system with a neat diagram. 1 K2


एक कोंप्यूटर नसस्टम के नवनभन्न घटक ों क नचत्र सनहत समझाइए।
J
4-

b. Write and explain the structure of a basic C program. 2 K3


|1

एक साधारण C प्र ग्राम की सोंरचना नलखिए और समझाइए।


c. Discuss different types of operators in C with examples. 2 K3
C में प्रर्ुक्त नवनभन्न प्रकार के ऑपरे टर ों क उदाहरण सनहत समझाइए।
d. Write a C program to input 10 integers in an array and find the average. 5 K3
एक C प्र ग्राम नलखिए ज 10 पूणाां क ों क ऐरे में ले और उनका औसत ननकाले।
e. Describe the difference between call by value and call by reference with 4 K3
examples.
कॉल बार् वैल्यू और कॉल बार् रे फरें स में अोंतर स्पष्ट कीनजए। उदाहरण सनहत।

1|Page
QP25EP1_311 | 14-Jul-2025 9:02:34 AM | [Link]
Printed Page: 2 of 2
Subject Code: BCS201

0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0

BTECH
(SEM II) THEORY EXAMINATION 2024-25
PROGRAMMING FOR PROBLEM SOLVING
TIME: 3 HRS [Link]: 70

SECTION C
3. Attempt any one part of the following: 07 x 1 = 07
Q Question CO Level
no.
a. Explain the differences among assembler, loader, and linker with suitable 1 K2
diagrams.
असेंबलर, ल डर और नलोंकर के बीच अोंतर क उपर्ुक्त नचत्र सनहत समझाइए।
b. Draw a flowchart and write pseudo code to find the factorial of a number. 4 K4
नकसी सोंख्या का फैक्ट ररर्ल ननकालने के नलए फ्ल चाटय बनाइए और छद्म क ड
नलखिए।

4. Attempt any one part of the following: 07 x 1 = 07


Q Question CO Level
no.
a. Explain the use of logical and bitwise operators with examples. 3 K3

4
11
लॉनजकल और नबटवाइज ऑपरे टर ों का उपर् ग उदाहरण सनहत समझाइए।

24
_3

b. Write a C program to check whether a number is even or odd using switch 3 K3

7.
case.
P1

.3
खिच केस का उपर् ग करके सोंख्या सम र्ा नवषम है र्ह जाों चने का C प्र ग्राम

42
नलखिए।
5E

9.
P2

|4
5. Attempt any one part of the following: 07 x 1 = 07
Q

Q Question CO Level
AM

no.
a. Write a C program to reverse a string entered by the user. 5 K4
उपर् गकताय द्वारा दजय की गई खस्टर ों ग क ररवसय करने का C प्र ग्राम नलखिए।
34

b. What is a structure in C? Give an example of an array of structures. 5 K3


:
02

C में स्टर क्चर क्या ह ता है ? स्टर क्चर का ऐरे उदाहरण सनहत समझाइए।
9:

6. Attempt any one part of the following: 07 x 1 = 07


5

Q Question CO Level
02

no.
-2

a. Write a recursive C program to find the nth Fibonacci number. 3 K3


ररकनसयव C प्र ग्राम नलखिए ज nth नफब नाच्ची सोंख्या ननकालता है ।
J ul

b. Explain bubble sort with example and write its C implementation. 4 K4


4-

बबल सॉटय क उदाहरण सनहत समझाइए और उसका C क ड नलखिए।


|1

7. Attempt any one part of the following: 07 x 1 = 07


Q Question CO Level
no.
a. Write a C program to read and display contents of a file. 5 K3
नकसी फाइल क पढ़ने और उसका कोंटें ट नदिाने का C प्र ग्राम नलखिए।
b. Explain self-referential structures and their use in linked list. 5 K2
सेल्फ रे फरें नर्र्ल स्टर क्चर और नलोंक्ड नलस्ट में उनके उपर् ग क समझाइए।

2|Page
QP25EP1_311 | 14-Jul-2025 9:02:34 AM | [Link]
QUESTION BANK UNIT-1
Introduction to Components of a Computer System, Idea of Algorithm,
Programming Basics
Short Answer Type Questions
1. What is Algorithm? List characteristics of an algorithm.
2. List the functionalities of an operating system.
3. List different approaches to design an algorithm?
4. Differentiate GUI interface & CUI interface.
5. Write down any four characteristics of a good programming language.
6. What is pseudo code?
7. What is kernel?
8. What is the use of diamond box in flowchart?
9. List 5 input and five output devices.
10. Differentiate RAM and ROM.
11. What do you mean by memory hierarchy?
12. What is ASCII?
13. Give any four format specifiers used in printf() function
14. List various types of scope in ‘C’ programming.

Long Answer Type Questions


1. Justify that operating system is a resource manager.
2. Discuss the major components of a digital computer· with suitable block
diagram. Also discuss the functions of these components.
3. What is operating system? Give name of four operating systems. Write five
important features of any one operating system.
4. Draw a flowchart to play a dice game according to the following rules

(i) If you throw two identical numbers, you win.


(ii) If the numbers are not the same, but are both even, or both odd, you have
another turn.
(iii) If one number is odd, and the other is even, you lose.
5. Draw a neat schematic of a digital computer and explain the role of each
functional unit.
6. Draw a flow chart for arranging three numbers a, b and c in ascending order.
7. Discuss various storage classes in C with suitable example. Also give their
significance.
8. What are different data types in C. Explain in terms of memory size, format
specifier and range.
9. Differentiate between the following: -
• High level language and low-level language.
• Compiler and interpreter.
• Logical error and run time error.
• Algorithm and flowchart.
10. Explain the structure of C program with suitable example.
11. Write about the formatted and unformatted Input / Output functions in 'C’.
QUESTION BANK UNIT-2
Arithmetic Expressions and Precedence, Conditional Branching
Short Answer Type Questions
1. What do you mean by type conversion in 'C'.
2. What are escape sequences characters?
3. What do curly braces denote in C? Why does it make sense to use curly braces
to surround the body of a function?
4. What will be the output of the following code? void main( )
{
int a=5,b=6,c; c=a++>b&&++b<10||b++; printf("%d%d%d",a,b,c);
}
5. Find the output of the statement printf("%d%d%d",n++,++n,--n);if
n=3.
6. In C programming what will be the value of r if r
= p % q where p = -17 and q= 5?
7. Write down the difference between associatively and precedence of operators.
8. If int a = 2 , b = 3, x = 0; Find the value of x = (++a, b+=a).
9. Find the value of Y (assume Y is integer data type) Y=4 * 2 / 4 – 6 /2 + 3 % 2 *
6 / 2 + 2 > 2 && 4 != 2.
10. Differentiate the following:
(i) Unary operator and Binary operator
(ii) Local variables and Global variables
11. List various types of scope in ‘C’ programming.
12. Write a program to check whether given year is a leap year or not ?
13. Differentiate nested If and the switch statement in C language with suitable
example.
Long Answer Type Questions

1. What is bitwise operator ? Explain all bitwise operators in ‘C’ with suitable
example.
2. Write C program to swap two numbers using third variable and without using
third variable.
3. What do you understand by ASCII value of character? Can we use expression
including both integer data type and character data type? Justify your answer.
4. What are the different types of operators in C language? Explain with
example. Discuss the significance of each.
5. What is a role of SWITCH statement in C programming language? Give the syntax of
SWITCH statement with a suitable example.
6. Differentiate between nested If and the switch statement in C language with
suitable example.
QUESTION BANK UNIT-3
Iteration and Loops, Arrays
Short Answer Type Questions

1. Give the for loop statement to print each of the following sequence of
integers:
• 1, 2, 4, 8, 16, 32
• -4, -2 ,0, 2, 4
2. What is the difference between while loop and do-while loop?
3. Differentiate the use of break and continue statements. With an example.
4. Explain the purpose of break statement in c.
5. Write short note on the· following with example in reference to C language:
• Data type
• Entry and exit control loops,
• Switch statement· and if statement.
6. WAP to find the minimum and maximum element of the array.
7. WAP to search an element in a array using Linear Search.
8. Declare and initialize three dimensional array.
9. What are subscripts? How are they specified? What restrictions apply to the
values that can be assigned to subscripts in 'C' language?
10.

Long Answer Type Questions

1. Write program for following-


a. To check any number is perfect or not?
b. To check any number is palindrome or not?
c. To print Fibonacci series up to nth term
d. To reverse the digits of any number
e. To calculate factorial of any number
2. Write a program in ‘C’ and Draw flow chart to find whether a given
number is prime or not.
3. Write a program in C to calculate the sum of the following series up to nth term
F(x)=x1-x3+x5-x7+….
4. Draw flowchart and write a program in C to calculate the sum of Fibonacci
series up to 100 terms.
5. Explain in details all types of loop and conditional statements exist in C.
6. Write a C program to calculate the sum of
SUM = -13 + 33 - 53 + 73 - 93 +113.(50 term)
7. Write a program in ‘C’ to print the following
A
BA
ABA
BABA
ABABA

[Link] to implement strlen (), strcat (),strcpy () using the concept of Functions.
[Link] that finds the sum of diagonal elements of a mxn matrix.
[Link] to add and multiply two matrices of order nxn.
[Link] structure and union in 'C'.
[Link] the database of students in C having the following attributes: Roll_no,
Stud_name, Stud_address; Stud_city, Stud_PINCode, Stud_Semester, Rank, and
Branch. Also write the program in C to enter the data for 100 students in any
order and then display the list of students for a given branch and Semester on
display.
[Link] with example, the syntax and usage of the following in C program :
• Nested Structure Definition
• Array of Structures
[Link] a program to print out our array using the array notation and by
dereferencing Pointer.
[Link] to declare an array? Explain about various operations of an array.
[Link] a ‘C’ program to read in 10 integers and print their average,
minimum and maximum numbers.
[Link] a program to check whether a square matrix is symmetric or not.
[Link] a program in C that reads the two strings of length at least 7, then
concatenate these strings.
[Link] a program in C to read 5X5 matrix using array and calculate product of
diagonal elements.
[Link] a program to define a structure named employee having empid, name and
designation. Use this structure to store the data in a file named "[Link].
Once all the records are entered display the employee details stored in a file.
[Link] is enumerated data type? Write a C program to display months in the year
using enum.
QUESTION BANK UNIT-4
Functions, Basic of searching and Sorting Algorithms

Short Answer Type Questions

1. Differentiate formal and actual arguments.


2. List types of functions based on number of arguments and return type.
3. Write syntax of declaration of any function.
4. Differentiate user defined functions and standard library functions.
5. What is function prototype? Why is it required?
6. Define sorting and explain bubble sort technique.
7. Differentiate between call by value and call by reference.

Long Answer Type Questions

1. Write a program in C that accept the length and width of a rectangle and print
the area. The area of a rectangle is calculated by a function and returns it value
to main program where it is printed. The values of length and width of
rectangle are accepted from the keyboard. Also give the flowchart and
algorithm.
2. Draw the flow chart and write a function in c to calculate the sum S of the
following series ':
S = 11 + 22+ 33 + 44 + ... + NN
3. Draw a flowchart and write a function in C to calculate factorial of given
number and also write a program to calculate the sum of the following series
using the above function
s=1! + 2! + 3! +…. +N!
4. Write a program in C to calculate the sum of the following series up to nth term
using function-
F(x)=x1-x3+x5-x7+….
5. What is a recursive function? What are its basic properties? Write a function
which finds the sum of first n integers; where n is the argument to the function.
6. Explain recursive function and also write a recursive C program for computing
the factorial of a given integer number.
7. Write recursive program to print Fibonacci series up to given term.
8. WAP to sort the elements of the array in ascending order using Bubble Sort
technique.
9. Compare linear search and binary search in terms of complexity.
[Link] program to sort data using bubble sort and compare with insertion sort.
[Link] program to implement Selection sort method.
[Link] is difference in searching and sorting? Write an algorithm to sort a list
containing ten numbers using insertion sort and selection sort.
[Link] a program to create an integer array of n elements, pass this array as an
argument to a function where it is sorted and displayed.
14.
QUESTION BANK UNIT-5
Pointers, File Handling
Short Answer Type Questions

1. What is difference between macro and constant?


2. What are differences in Array and Structures?
3. What is void pointer? How is it different from other pointers?
4. What is the task of following memory allocation functions?
(i) malloc
(ii) calloc.
5. What do you mean by dynamic memory allocation?
6. What is pointer? How many bytes are needed for a pointer ? Justify your
answer.
7. What is the difference between the following directives? #include<studio.h>
and #include “studio.h"
8. What is conditional compilation and how does it help a programmer?
9. Explain the difference between const char *p and char const *p .
10. What do you mean by C Preprocessor? Give example of any two preprocessor
directives.
11. Write output of the following printf("%d", strcmp("QUIET', "QUILT"));.
12. Discuss about #PRAGMA directive.
13. A program in 'C' language contains the following declaration :
static int x[8] = {1,2,3,4,5,6,7,81};
(i) What is the meaning of x ?
(ii) What is the meaning of (x+2)? ,
(iii) What is the meaning of *x?
(iv) What is the meaning of(*x+2)?
(v) What is the meaning of *(x+2)?

Long Answer Type Questions

1. What do mean by pointers? How pointer variables are initialized? Write a


program in C to swap the values of any two integer variables using pointers.
2. Write a program in C to copy the text of one file to another.
3. What is a pointer? How pointers are declared in C programming language?
Illustrate with a suitable example
4. Write a C program that accepts name and marks scored by students in five
subjects. Use functions :
• ADD to add records with student names and marks to a file.
• CALCULATE to read the records from the file, calculate the result
and display.
5. Explain with example defining and calling macros and conditional compilation.
6. List out various file operations in C. Write a C program to count the number of
characters in a file.
7. Write a C program to copy the content of one file into another file.
8. A file name DATA contains a series of integer numbers write a program to read
these numbers and then write all ‘odd’ numbers to a file to be called ODD and
all even numbers to a file to be called EVEN.
9. Write a program in ‘C’ that takes 10 integers from al file and write square of
these integers into another file.
[Link] are the merits and demerits of static and dynamic memory allocation
techniques?

You might also like