0 ratings 0% found this document useful (0 votes) 37 views 15 pages Programming PYQ - Compressed
The document contains a series of programming questions and tasks related to C and C++ programming languages, covering topics such as software differentiation, memory allocation, loops, functions, and data structures. It includes practical coding exercises, flowchart creation, and theoretical questions about programming concepts. The document appears to be an exam or assignment paper for a programming course.
AI-enhanced title and description
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here .
Available Formats
Download as PDF or read online on Scribd
Go to previous items Go to next items
Save Programming PYQ_compressed For Later rn Deca
‘CO10504/ CO10507/: PROGRIS,
oe BH]
TOTAL NO. oF:
Se
a eatin st eo pcs andeach
sstsoomsiory tsp anyone roa sa
Question
Differentiate between:
1) Application and System Software
ii) Keywords and Ideatifies
) _Iéentify the most appropriate answer of the folk »
peg ae Ped
ii) Coniputers use ther language to process data
iii) Monitor and Printer are cxumples of pes of|
col BT 17.1
—apGeviens
iv) “A'S i. is a type of memory that is noa-volatle and stores
data permaneniy.
(Answer the following
(How many bits sre tere io
megabyte, ané 2 gipabyte?
A GiExplain the structure of C program wit am exaule,
I) Draw a flowctart wo validate apten ede. ont andy), 05, O01 BTS 252
including checking if the yea isa esp yea or Fema, ane
ensuring the day is within va range & oll mothe
(Whats the role of we Srpilorin deine prope 70?
yr on
002 BM 171
the Follewing: 2 byte, 2
2 oo BT 171
1 Deww m Cowchut tans he curiae Or nee
3D), (2, 92), and (3s 39) ad SO
considering the cllineariy of he POMS
Defias 4 parle in oan,
‘ “vadble and 2 conse 7
is the difereneeint x= 2, ¥=3,
Toca hm
Heat a= 15,05 25,0 ies
return 0}
ni see
€or teem
following income tax slabs:
i
7
|
Gand * 462029 71
Bay Bats
oe re
rit =a pet motel
Tncome Rs. 50600: 30% om income exceeding Rs,
50,00, pos oes foal previous sb
7a
ni
Fi
Writ a code to differentiate between while and de- while loop.
Write a cod to differentiate call by value and call by reference.
rin fn 0h on er of pin a
‘aig ssh that he dione Sete nen
hunter The progam els sop asin a
Write» reuse progam io caste te re
repens the anes of nye
tee Sigrvure sa
cg
erin a gnen
ore
Sratdya
of a,
‘ser tent gaat
Rae BACs givenby: nce =I
* Differentiae between sen,
the elements to is right yale leader if
"ate? denna so HE pope
an With 8 Rsction
by d postions inclace Re array oft elements
Tepe tseg ty edition anger td MOM the
Write @ C progam te count phen stomp.
ee the nuns ot oe
An ekmen ofthe amy i anne
arrayDefine malticimension
ect NEE Ay oy
matrix A saddle point jg ay itCt
lement ints row but the 22 leet
Greate an array of 3 empio
and display the details of
‘What is dynamic memory allocation in C? Lis: functions tnt we!
used for dynamic memory allocation in? ke
Explain the purpose of the following file functions
este fputeO,feets0, fats, find, fant)
What are abstract classes? How ar they implemented in C+?
Write program to create a class Student with dita members
name, roll numter, and marks, Inchds methods fr setting ani
displaying data
oR
Pee inneritance in Cer. Bap 15 fpertner in Obit
Oriented Programming. Write a C+ pom eee
| Single inheritance. Create «base class Pesan wan afte ot
and age and a -ycthd to display then. Dethe & Sas Soe
from Person with an additional ate ma
lisplay all the details.
employees can the use,
‘50,000 using structures. "PO? sae ey gee al
Se,
7 COsete as.
2 cos Brain
@ 004 Bz 174
S
cos Br? 1741
7 008 BT4 45.1
7 ona RTA 4s: R: 5 %
‘Time: 3 Hrs] Peas an clas state ae *
ver reat es five sub Parts &, Dd, Pan,
NOTE: 1) Answer to the polat and mi mrestion c2FFiCS "
2) Attempt alparsf same question at one lee
¢is eampulsory and attempt any one from
1 |o
ea ae
The é
ee sed to skip statements ih. Toop.
‘twee, ti
e preprocessor
te statements
US Word an example of es
<7 Expain define and incl
What is preprocessor directive
dizectives aos
Evaluate the expresions forthe following, assume that the vatisbles are declared
ieee
inx=3.y=42=5%
leans b= 3.5,6=4.5,
) loa (y%x)*y/2I zs
ibe aoe yy
iy Solinsy ee ee
Take three points as input (x1, yl), (x2,¥2), and (x3, y3). Draw a flow chart
to Bnd
whether the points forma triangle of not
How run-time error is different from compile-time errors?
“OR
Daw a flowchart to caléulate the Sum of given Series:
fxn 402-457-+, dade ee
State Tixe or False
1. print, scant“,
a sind oa) isa valid C statement,
1 a oe
Define type esting and type
Forthe following while
loop,{
paintft");
; wileGi==num)
printf(-Yoa"m2em2-H);
its
Me n
Ay,
ponif0"s ae
eae Cc»
iy nal
|Wiite @ C program to read an amount (integer value) and break the|
amount into the smallest possible number of bank notes, (Currency
Inctes are available as(100,50,20,10,5,2,1)
[Test Data:
Input the amount: 375
Expected Output
There are:
3 Note(s) of 100.00
1 Note(s) of 50.00
1 Note(s) of 20.00
JoNoxe(s) of 10.00
LNotes) of 5.00
loNotes) of 2.00
ONotes) of 1.00
Write function in Cte prin following pattem
‘Note: Only aumber of columis willbe the input parameter tothe Function
Mirored Porallelograns
@ Of
wre prografito tnd the difrence of wo dics Ia yeas, sont, and
Says Je the ented dies se valid or not. Assume thatthe Bist
ine fils bore the second date. (Dats fora DDNAMY YY)
=
~
|
sa nll statement? How can it be useful i our programs?
‘will be the output of the folloving program, when program is
1 Justify your answer.
‘dio.b>
Griraesy)print 960 960" wu 2)
return;
all po
equation ; (ox
Fs att (orbit roots and print
omialco-eficient|
and o) of a quadiatic
ie et epee
oO
[a prime munberis one thatcom only be o
is cate tappy sumer, ityou pes
tke digits, til the value 1 is obtsined.
bey a ao
Example: Assume a nunber‘23"
Sumber Computation Result CyclesIeraton
factored by itself ot rng the sn
rime
ned em eter the number eter
‘A nambér,
ge ber tai
iteration onl.
G
Number | Computation
A ata?
3 ar
10 Cn
So number ‘23° iss hapoy prime nutaber.
Explain the auputof te follow 10
include ee ree
int main
intariS} (1,2,3,4,5);
iel= a,
iat ped ped,
int *pr3= p23,
Pla,
Pima", ppt
prnttdn", ary
[Given array of ize Nr
aA
[thearray respectively. Task isto fad nes
to die: given array such tat io
many n
all te element ig gee
Jistification?
—<———
neleeieniee acos
| aimeExpected Cutput:
What is the capital of Japan?
JA Beijing 3
B. Seoul
IC. Tokyo
Re Bangkok
four answer (enter A. B,
Correct Well dng nS
@ [What is the difference between the function malloc( and calloc(fPEsplain| 02 |cos [wr2 [7.1
with example.
lo The following recursive function tkes a sring of given lengtias inputand | 02 |CO4 )BT2 |1.7:1
determines whether the strings a palindrome. It returns 0 ifthe string i not
2 palindrome and 1, if it ia. Fill in the blanks. Each Blank ean have AT
MOST one statement.
int ispalindrome(char Al J, nim)
(
jif¢_) turn:
i¢ ) rosurn
eum Tapatinerome(__)s)
© sin he vn of bse cass mbes fore acew opecifere] OY [604 AT 17)
(© | {Beate poet, nd bie |
Pie ween th SO 7 |cos Jats [451
Pa cgoneverkadng and Opener veronsing
(Fapstaction ond Enconstaof
(in) Static and Dyoamic binding
a, Differentiate het
oa a
notw on the following functions. For each function, give a 7 |coa ars Jaan
dha demonstrates is usage.950°
Stn er
roving the paper uesaes
INATION
.c- 2029 EXAM!
1Be/B Tech. (8,0 se EM SOLVING
(€010504/010507: PROGRAMMING F é
45
i)a+2> bl le 88 a=—dtEe?
ng ode snippec
1 a
ease ‘Age onibecllnt) break; )
jease B™ 4 printf(“Very Good) bres; )
ease “€% t prits("Gooa")
2.C bropain tat kes thee coricints bang of@
bx) a input and compu al poss fn
ron orn them wh tts
OR
ci
between the folowing desariupagy
ene
8]: ot *(ar3a), aacewrsuens, Mobile : 9893555950
Pras 6 not share pars with Sur nnd by
helene next eum fr proven He Pape opie,
>| Gonsoe pve negara whic an be xpress sa power
Soar ero neces powiote FB] WoO a
rae ca
‘nin q
E We
no. tp. fag:
|santeaeeasy *
ery
rad 6a nunber at can be expres power of 9 3
ee :
Print ancl be eres pave fa
Je) | Weis owing tnaion va ecrsivemsma ‘
1 Wie ion = @ feos fora faws
dm Ain) ¢
-fieipsann
fa) [Define Fancion and Wr Er ayer ciirgr ch cos [ara |
POR hissrecn eel alee
rinthem an elie, ma xanga gfx conylee ee
‘ |
Sic
ota
on
Sie mage MeMareae ais uanaie ns Some co Poe
TimeSr ain menbers cle bur, mau and scone evoke |
fs prowacitiut assgn values tothe eiidual members and gly
Ine tii the FORA 16:40:30. |
Dy | cing any Bierences between while semen ad'@Do- while sement] 2 [003 JBTs 2
She
gs progr (oroversea sting, For example ‘5 erate
aE
ees S
Sah EES a patr ho
pene erariar eal
eo reas te
a
ao ws @ cos fara }i.21
es beeen. prowiuics orented nd cect orient]
|ic)
te) _[Dinarentiae berween compile ine.
rn ime polynoxp hist
the
[Exphia the visibility of base class members 0°
protected, and public.
fiers: private.
cess speci
o
[Dinterensiae benveen the following with programing example:
I) Fuscton overonging and Opeator overlong
i Object and Css
i) Abstraction snd Eacapsulton
oR
te)
Differentiaie between the following with programming example:
Overionding and overriding
Multiple Inheritance and multilevel iheriiance
) Static binding and dynamic binding
nee Sm
2FEB 2023 EXAMINATION
IBTech. (4YDC) EXAMIN,
€010504/ C1 : PROGRAM Rl
/ CO10507: PROGRAMMING FOR: PRELIM SOLVING
ae 3801
TOTAL NO. OF QUEST
"i [ONS IN THIS P, %
1) Amswer to the point and make assu PAPER: $
ental Raat pectoc sl cas pien sates, reve required nd cari
Mirgpasory and attempt any one from dnd. carries five
ustioaNo. Question
eo Differentiate between:
i) Souree code file and execstabe code fle
~4) Keywordsand Identifiers
o Ia ere se aa te ee
i) command is use to rename efi in linux enya.
i) Computes usethe angus to proces ia.
__ iid ‘Seater nd Mouse are exampes o¢__9pes of de =
iy), Tteret Explorer isan example of softwere (Systen/Applcation) =
“Answer the falloving: . F
nD, How roan bis are there we flowing byte egabste 2nd abate? é
nO Batet the name of Linux commands Ua are wed fer development ofthe E
program asingC language ‘
(0) Draw 1 noweturti chook wheter heghetiets nimbet is pine mbsf 05 CO! BIE. 252
Daw no erar nile of cose Of the per 5c, ncgave name, post
pmnber and ponsintessr . 2
me eror is different from aurpietine eer?
or
5.1
03 col Br 171
Gi) How nt @ col BR 1m
Aomchat to calcul ie sum sre.
Sat +t xT
pays to declare scope of vara
Draws
in(>) = 8
yas avril” Ean ti wa cov sm 1m
somenms wiblabor Paine 8 or cnveion we hip an 02 08 T NTD
tonne a,
Srey bee pri anor te nie
an {athe range of values that can be stored by int datatype in C
ype of _—__eperster.
iF the umber of whiespace
voc ie matched in a switch
dumcters allowed in C lange
Statement, when ll ces are
squnie, and 03
Soclae ott ty [xt *b,
Ti yee) x7 at Hx BZ eS*
on
seat aes of we aa ens mec
wre ed en ft ne
oy coz BT 252
2 cos BIZ 1.1
nt 1og? ‘Wri the byiaxointnite oP SPB for toon.®
©
ads by
estate
erst pot sr ene ne
raphain oe ont te
‘Rrclude
intmaindt
fegeas anit
‘egeziee sit?
Tec 54)
reat
waar),
oR
eat
“Write the follawing fonction in
:
pi:
eee
ea
Oe a eae
recursive ranaer.
+110 285
Conside 3 sond ary X of leads. Gjven @ key tobe searched. the array iy 07 COV BT
‘atom ik tvee halves tthe leas id ard mic2, mid 1 adicates 1/3"
Index and mid indeates 23 index of fe soned aay. Now comparing the key
Yat fo wil id is adler whaler the Key lies in fist thre, Tice
Did oF st thd of fe ai Cent
ca at hd of be ay Centnue te process unt the key is found, if 1
Se oe Warren ne A
Should stu te vue
th
Hh fi
Porites
o
o
©
©
©3.82
peu Mye: Vout, DUDITS C;
Mobile : 9893555950
oar
Please do not share papers with. cs
Botta hoy mt
ates Sa Screven
ofempld and name.
Compare and contrast the structured programming and object oriented
oe '
Explain the visibility of base class members forte acsss speci
‘protected, and public. y
Differentiate between the following:
{@)_ Function overlooding end Operstcr overloading
(Gi) Abstragtion and Encaysulation i
‘with a function tat iis “Tis Is nshapbe. Crate 07 COS BT3 451
erting the Shape sass with hese fiona
ae we olner clases tamed Recngle end Trane
Rectangles «polygon and Tange i 2
Greate a class nied Shape
‘another clans samed Polson in
prints "Folygen is shape”. Cr
Thaving the same funtion which prints
polygon” respectively
oR
07 Cod BT 451
ace pitt’ with two-rembe non all wi ihe me ome
Implement oc
‘pai ean
ayn ve = at is wae owed a of
70 eit nt a a tag iow he
in)
£ ms ‘a. comma in square brackets,
cases he weve ea on
‘old pr
teers neavated DY
‘rite nan funtion
? al
a,
Se,
You might also like C# Programming: Arithmetic, Swapping, Data Types, Quadratic Roots, Palindrome, Even/Odd Numbers, Leap Year, Floyd's Triangle, Stopwatch PDF
C# Programming: Arithmetic, Swapping, Data Types, Quadratic Roots, Palindrome, Even/Odd Numbers, Leap Year, Floyd's Triangle, Stopwatch
56 pages