0% found this document useful (0 votes)
181 views12 pages

Previous Year Question Papers

This document outlines the instructions and structure for an examination in programming problem solving. It is divided into 3 parts: Part A contains 7 basic/fundamental questions without choices. At least 2 questions must be of a variable type with different answers. Part B contains 5 numerical/analytical questions, of which 2 must be of a variable type with different answers and the remaining 3 have different answers. Part C contains 5 descriptive/analytical/problem solving/design questions and students must attempt any 3. Questions may contain internal choices. Diagrams must be shown clearly and units stated where necessary. The document provides examples of the type of questions that could be asked, such as differentiating between

Uploaded by

prince prosa
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)
181 views12 pages

Previous Year Question Papers

This document outlines the instructions and structure for an examination in programming problem solving. It is divided into 3 parts: Part A contains 7 basic/fundamental questions without choices. At least 2 questions must be of a variable type with different answers. Part B contains 5 numerical/analytical questions, of which 2 must be of a variable type with different answers and the remaining 3 have different answers. Part C contains 5 descriptive/analytical/problem solving/design questions and students must attempt any 3. Questions may contain internal choices. Diagrams must be shown clearly and units stated where necessary. The document provides examples of the type of questions that could be asked, such as differentiating between

Uploaded by

prince prosa
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
You are on page 1/ 12

writing

actionanything excepl roll


0422B shall be taken as per
number on questuon paner
Roll No.: rules. wl be deemed s an se ot
B. Tech. I
undule1ng in untatr mea
Semester End-Term1E000422B Total No. of Pages: 2|
Branch: Common
1FY3-04: Examito nation (Back),
Time: 3 Hours
Instructions to Candidates:
The qucstion paper is
Programming forall branches January-2025
Problem Solving
5 divided three parts A.B&C.
in Maximum Marks: 100
Part-A:
Gi) Part-B: 5
Basics/Fundamentals
(iii) Part-C: 5 Analfrom
either A or B yticaleach
/N umeric al related questions
questions (without choice).
(with internal
question). choice ie, attempt one
question
schematic
of 5).,

be assumeddiagrams
DescriptivelAnalytical/Problem
must be shown
Solvino/Desien questions (attempt any 3 out
Use of
and stated
clearly. Unitswherever
following supporting of necessary. Any data you feel missing may
Ni material is quantities
permitted uscd/calculated must be stated clearly. suitably
during examination:
2 Nil
PART-A
(Basics/Fundamentals
All
questions are related questions)
a (o)
Differentiate between flowchart and algorithm.connpulsory
3
0.1 (b) What are the
valid places where the
Statement? programmer can apply Break Control 31
0.1 (c) Find the output of the
int main) following code and give reasons in support of your answer: 31

int a(5]-{10,11,13,40,50}:
int p;
p-a :;
printf("%d,",*+tp);
printf("%d",++°p):
return 0;

.1 (d) What would happen if you assign a value to an element an array whose 3
subscript exceeds the size of the array?
01 (e) How, would you use the functions fseek 0. fread), fwrite() and ftell()? Give 3
suitable examples.
PART-B
(Analytica/Numerical questions)
program in context of Intermediate code,
C [8
Q.2 (A) Explain the Compilation process in a
Executable code and Object Code.
OR
and
the basic organization of computer system, (8]
0.2 B Draw a block diagram to illustrate units.
explain the function of the various
Page 1 of2
0.3 (A)
Explain the
Q3 (B) What is thedifferent types of operators used in C with
various loopingpurposPOSe of looping OR necessary program. 18

statements in Cwvithstatesuitable
ements? Explain in detail the operation of (8]
0.4 (A) WAP that examples.
takes a
an input
from the proverbial statement (like ailures are the pillars of
user and then
statement. success.in) the (8
output the frequency of the vowels occurring
0.4 (B) Explain the OR
string manipulation library
functions with examples. [8
0.5 (A) Define
function?
an example. Explain the call by value and call by reference with
the help of 18
Q.5 (B) What are OR
pointers? How is static memory allocation different than
memory allocation? dynamic [8]

0.6 (A) What is a structure in C?


Explain the concent of pointer to structure with an [8
example.
OR
Q.6 (B) Why files are needed in C2 What are the different
types of files opening modes? 8|
Write a program that reads integer numbers from a file abc.txt and display only even
numbers.

PART-C
(Descriptive/AnalyticaV/Problem Solving/Design questions)
(Attempt any 3 out of5) (Q.7 to Q.11)
Q.7 What are data Name and explain all the data types in c language with the (15]
help of examplese Aleewite thei size in hvtes & the formula by which we can
calculate the range of a given data type.
Write an algorithm and also the program to calculate the grade of a student after the (15]
Q.8
input of marks of that student.
Percentage >= 90 grade is 'A'
Percentage >= 70 grade is 'B'
Percentage >= 50 grade is C
Percentage < 50 grade is 'F"
[1s)
declaration and initialization of one and two
Q.9 What is an array? Explain the Write a C Program that will sort a
Dimensional arrays with the help of an example.
bubble sort algorithm.
given one dimensional array by using
of a number using [15)
program to calculate the factorial
Q.10 Define recursion? Write a C
recursive function.

Page 2 of2
Q.11 Detine structure in C? Write the
help of an example. Write a Cdifferences
program to between structure and array wiun u (15]
complex number using structure. perform the multiplication of two

Page 3 of2
1EO00421

B. Tech. I
Semester End-Term1E000421 Total No. of Pages: 4
Branch:
1FY3-04: Exami
Common tonall
ation (Main),
Time: 3 Hours for lBranches February-2022
Programming
Instructions to Candidates: Problem Solving
The question paper is
(i) Part-A: 7 divided in three parts A,B & C.
Maximum Marks: 105

(#
auestions
is same, Basics/Fundamentals
must be of
variable typerelated
which questions (without
have different choice).
answer Out of 77 questions, At least 2
Part-B: 5 for each student even ifif the process
the Numerical/Analytical
be of variable
type which have questions. Out of 5
remaining 3 questions have different questions.2
answer for each student questions
question. internal choice even if the(without choice) must
(ii) Part-C: 5
i.e, attempt one
guestion eitherprocess is Same a
A or B irom eacn
question
isDescriptivelAnalytical/Problem
must be of variable type which have Solving/Design questions. Out of 5
is same which
Schematic diagrams mustcompulsory and attempt any different
2 answer for each student even ifquestions,
the process
be shown questions out of remaining 4
assumed stated clearly. Units of
and wherever necessary. Any data you feel missingquestions.
IJse of following
1 Nil supporting materialquantities used/calculated must be stated clearly.may suitabiy be
is permitted during examination:
Nil

Sasics/FundanA
(Bas
srelated questions)
All questions are
compulsory
0.1 (a) Why flowchart is used before writing the
program for the given problem? (31
(b) Can an assignment operator copy one array to another? Justify your answer.
3
(c) Are the expressions *ptr ++ and ++*ptr same? Justify your answer with example. 31

(d) if 'statement can be used wherever switch statement is used" whereas vice versa 31
is not possible. Justify your answer. Write the output of the given code:
int main0
char x = 'w':
switch(x)
case 'a': printf("Append");
break;
case 'w': printf("Write");
case 'r': printf("Read");
break;
default : printf("Open");
break;
return 0;}
[3
variable of one type into another
Typecasting is used for converting the value of a Give an example where this
(e) evaluation of the expression.
type for purpose of
typecasting is useful.
Page 1 of4
(O Can we
output ofcompile
a
the program without main()
Your Roll no.given code: (where value ofa functiou?
is T21J1C is the sumlustify your
of the digitsanswer.
of yourWrte
e
int main0 CS120 then a-21+120-141) rol(e.4
int a.b:
b++a:
printf("%d,
return 0;
%d",a,b);

(o) What is the valuc of x


after the execution of the
Explain your answer. (where value
Your Roll no. is of a is the sun following program
of the digits of yoursegmentr
(31
T21J1CS120
then rol(e.g
x=a; y=60; a-21+120=141)
if(x>y)
X=1;
clse
x-2*x;

PART-B
(Numerica/Analytical questions)
o.2 (A) Write a program that takes in two strings SI and $2 as inputs (Sl as your first name
and S2 as your last name), reverses Sl, appends it to S2 and outputs the final string
Your program should not use any default string library function.
OR
(B) In Indian Railway ticketing system, there is no ticket requirement for kid (age<=$ 16
yrs), ticket price for child (age in between 5 yrs and 10 yrs) is half, for senior citizen
(age>60 years) ticket price is 60%.Write a C program that implements age-based
price of the ticket and will output
quota system. The program will read age and
payable price.
arithmetic expression. 16
precedence of operators in evaluation of an
0.3 (A) Justify the role of in an arithmetic expression is same, how does
When precedence of two operators
operator will be evaluated first?
the complier decide which OR Machine
and low level languages on following parameters:translation,
(B)Compare the high level maintenance of the code,
debugging and
dependency and portability,
comprehensibility.
memory efficiency and
is necessary to use
be used and where itusing Functions.
call by value can
situations where numbers
Q.4 (A) Write reference? Write a C program to swap two
call by OR
answer. What will be
Justify your
cach other?
to add pointers to
(B) Is this possiblethe C program?
the output of
#include<stdio.h>
int main(){
int m[2);
int "p=m;
m[0]=100;
m[l]-200; Page2 of4
9)
0.
Acceptafrom
Write the user
prog ran
this date,Athat cale today's date and
Performm lso, ulates the your
dry run oncalculate the number
Date ofhirh in the
that will be your program number of of minutes you format dd-mm-
generated. and lcap
stens of haveexisted
write theyears you onearthyy)
as of
witnessed til date.
Q.6 What will be the evaluation and the outpu
alphabetic
ohabetnumber
icalvalues output of the
is the
void
of
of
characters,following
characters
a 1, int your
code if
in ex if your name array a has your
is"xac" first
insert(int n) first name. Write the stepsthenof
a=[24,1 ,3name
])
as [6]

int i, j, temp, evaluation. ano


for (i
temp=1;i<n;
a[il; itt){
j=i-1; && temp <= ail)
whilej>=0
ait1]=aj):
a•i+1]= temp;

PART-C
(Descriptive/Analytical/Problem Solviug/Desigcompulsory.
n questions)
(Attempt any 2 out of 4) (Q.7 to Q.10). Q.11 is
0.7 Files can be created as a text file or as a
interms of the storage of binary file, how do the two
Write a Cprogram to readinformation and when should binary file formats differ [8+10]
name
store them in a file. If the file and marks of nnumber of studentformat be used.
from user and
previously exists, add the information of n students.

Q.8 Write an example where you think Union has to be used in


Define a Structure data type called time struct containing place ofHour,
3 members Structure.
Min [6+12]
ute and Second. Develop a program that reads 2 time Tl,and T2 and displays T3
after adding them.(For example TI is 10:20:39
T2 is 4:30:15
Then T3 is 14:50:54)

Q.9 (a) Explain any 5 String Manipulation functions with example. [6]
(b) Write aC program to perform the following:
(i) Accept a sequence of characters and special characters from the user. Special (21
characters can be any character that you find in Keyboard letters I to 0 (shift
Igivesthe!, shift
(ii) Count number2gives @..). characters in the input and display the count.
of special 3
ASCIl value.
(iii) For each character read, print the character along with itsin reverse order.
3
function print all the characters read [4
(iv) Using a recursive

are 3 subjects
test for a group of 4 students. There
Q.10 A teacher conducts a monthly Write a C program to answer the following.
marks being 10 for each. invalid input is
with maximum
valid inputs and display message if
Your program must work for all Page 4 of 4
en
() Ask the
(i) user to input marks of 3
(iiü) Computer
Grade the Average for subjects for 4 students.
students on each
all 3 subject for4
subjects as perstudents.
the following
scheme. Grade S it
(6
131
marks IS at least twice the
below the cut of
C. 'S.Gradeaverage.
B if Grade A 1t
marks is exacuymarks 1s at least
the average. averagetTGrade
a
(iv) Compute total Otherwise
marks for each student.
Q.11 (a) What is the (3
output of
#include<stdio.h> the following program? Also write the steps offevaluation. 16
int main){
int a[ ]={ }:
IInitialize
array elements with
II if name alphabetical values of vour first name.
=xac" then array a-124,131
int i,j, m;
i=tta[l];
j=a[l]+:
m =a[i++]:
printf("%d %d %d ", i,j, m):
return 0;}
(b) How can the use of pointers help in solving the
during the compilation of the program? What doeswastage or shortage of memory
the following fragment of C o0)
program print? Also write the steps of evaluation. Take your name as input string
in c.
char c[ ]="Your Name":
char "p =C,
printf("%s". p+ p[3] - p[U):
unfair
means and
1E000420
Roll No.
action shall be
taken as per
rules.

Total No, ofPages:


B.Tech. 1-Sem. (Main)1E000420
Time: 3 Hours 1FY3-04: ProgrammiExami
ng fornation, March Z021
Instructions to Candidates:
Problem Solving
Maximnum Marks: 105
,The question paper is
divided in three parts A.
2. Part - A: AlI B&C.
words each. questions are compulsory. The
Attempt FIVE questions in all. answers these questions are limited up to 25
2 Part - B: of
question.
A. selecting ONE auestion either Aor B
Part-C:Attempt any
Schematiccdiagrams sr must THREE
be questions. each from
be assumed and shown
stated clearly. Units wherever
of necessary. Any data must
quantities you feel missing may suitably
Jse of following used/calculated be stated
supporting material is permitted during clearly
1 - :Nlc. examination.
2. NIL

PART-A
Q.1 (a) Match the following :
(i) .xlsx [2
(i) Memory unit
(ii) TeraByte
(ii) Application software
(iii) Zoom
(iii) System software
(iv) Window 7
(iv) Excel file
(b) Write example of a programming language which supports
(c) Write output of the following code: compiler and interpreter.
int main)

inti= O:
while (1){
printf("%dn",++i);
if(í= -4)
break;

return 0;
2)
Write postfix notation of the expression: (A-B)*(C/D+E)+FI |2
(d)
You are given an integer array A[4]= {2,5,1,3}. Write a program to print 2513. [2
(e)
comparisons in Bubble
Ifn inputs are given in ascending order, then total numbers of [2)
Sort are ....
Write True/False for the following.
(g) value is modified.
(i) Call by value: The originalvariables are required to store the address of
variables. 2
(ii))Call by reference: Pointer
(h) Write recursive
G) Differentiate p function for
What is the use ofand *p withFibonacci
an series.
example.
rewindo function in C? [2

0.2 (A) Write name of any PART-B


FOUR iDDut devices and any EOUR Output devices.
B Write name of any OR
EIGHT storage devices in a
computer system. [8
Q.3 (A) In context of c
followi
*+J programmi
operators. Also nwrite
g language, write the precedence and associativity of the
-,--,+t,&&,ll,&,% suitable example(s).
OR
(B) Write a
program to "print a table of
any number" by using (i) For loop a
(ii) Do-While loop.
181

0.4 (A) Wlite name and example of any


FOUR String functions with their [8
OR
parametet
(B) Calculate total numbers of swaps reauired in selection sort for (i) Best case and
(ii) Worst case. Take one
example to show it. [8
0.5 (A) Differentiate Static memory allocation and Dynamic memory allocation with
example.
OR
(B) Define Ackreman function. By assuming suitable values, show the steps to solve it.

What is difference between array of structures and array within structure? Explain with
Q.6 3(A) example.
81

OR

(B Define pointer. How pointer is used in aray and structure. Write a program which
uses (i) pointer in structure and (ii) pointer in array.
PART-C
With suitable example, explain the difference between algorithm and program.
Q.7
Wite fow chat and
progrrn for"hoer search
Write program by
áven
a
umber. using switch case probie"
Example: Input:n=523 "it indvidul
Q.9 Output :Five To Three
Apply I
Insertion
bers in
numb
in sort to 2
Q10
descending order.Seqence of scendng order if yos
Show ll sseps e gven 7
What is
"factorialrecursion?
problem" byDifferertite
usinz i) reoursion d terzion
Q.11
recursion 2nd i) terion
Wte a progam to sum the list
operation elements from
(like input must be readd from a the list
from another file) flend otgt by using fileznd
musbesaved pred

You might also like