0% found this document useful (0 votes)
33 views15 pages

Structured Programming Language 1st Semester Questions

Uploaded by

rabbirifat12
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
33 views15 pages

Structured Programming Language 1st Semester Questions

Uploaded by

rabbirifat12
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 15

(t

B:Sc. (HONS) 11N ECE, PART-1, FIRST SEMESTER EXAMINATION 2022.


STRUCTURED PROGRAMMING LANGUAGE
[According to the New Syllabus]
Subject Code : 510809
Examination Code : 562-1
� Time-3 hours
Full marks---80
[N,B. The figures tn the right margin indicate full marks. Answ_er any five
questions.]
Marks
.,,-1. � Wl\at is S�ciured Programming L�nguage? Write d0wn the 2+4
_
charactenstics of Structured Programmmg Language. =6
ffe Describe the basic structure of a C program. 6
�. Dis � nguish between algor � bm and flowchart. 4
2 W Defme K'..eyward and Identifier. 2
(b) What do you mean by variable? How you declare and initialize a 5
variable using C program.
.Je'?What are the difference between. local. variable� and. global 4
vaua ? ' I w
.· bl_ es. _ . , . c\, c:L, ; ,}ti\11- , vl'.! d.,C
, _ _
(d) Descnbe dtft:etent-data types used. m C w,th example. 1"' �-' -f\cc. 5
y. (a) V/hat d.o·yoU-ktiow about relational and logical operators? 5
(b) Write a C prog:ran1 to find out the sum of series !+2+�-�-- + 11. 3
(c) DesQribe resting oflf'-HLSE statement with i;lowchart. 5
fa![ D,i�tinguish between ++m and tn++. 3
4. .(a) What do you mean by loqp? Describe <lifferent types of loop, 6
(h) 'What are the difforenees between white and do:.while statement? 5
(c) Write a C program to calculate the area anx:I pedmeter of a Circle. 5
5. �t ts array? Why au array is called strUctured data type? 5
�hat are the types of array? Declare and initialize two 6
dim.ensional anay,
�rite a program to find th� n.:.-th_ Fibonacci _series. 5
6. (a) Define function ·prototype. 2.
(b) What _fa function definition? Write general foim of function 5
definition.
(c) What is the difference between call by value and cal.I by 4
Reference?
fd) What is recursive function? Write down. the prop�_rties of 5
recursive function..
7. (a) Describe. about stmctur.e and union. 6
(b) What is file? Write down the advantages of using file. 5
{c) Write a program to append contents of one fil� tb another file, 5
���1£1�

�I

N
B.Sc (HONS.) I ECE, PART-I� FIRST SEMESTER EXAMINATION, ·2021
E
STRUCTURD PROGRAMMING LANGUAGE
[According to the-New Syllabus]
ECE..510809
Time--3 hours
Full marks-SO
[NB. 'I'he.figur�s in the right.margin indi<:atefu1lmarks
]
Answer any five
questions. -,,,
Marks
1. ,../?) Whatis ·structured programming lartgmige? Write down the 1 +3=4
important :(eatures of C language,
,� De.fine algorithm, pseudooode and flowchart. Descrihe the 6
symbols used in flowchart
(c) Descril)e the process of co.mpiliij.g Md ruJ:1Iling a C program, 4

-4,.djWrit� down the characteristics of structured ptogramnring


language.
�at is an id¢ntifiet? Write down the rules for declearing 5
idertti(Ier.
j�xplajn different types of constants used m C language. 6
�Wr:ite a program in C to convert Fahrenheit, temperature to 5
Celsius..
3. (a) Describe the scan/() :function with ex:�ple. 2
(b) Describe arithmetic, relational a:nd logical operators use.cl in 6
C ianguage.
\ /
(c) Define loop. Desc_ribe different types of loop. 5
(d) Differentiate between a - - and - - a. 3
4; (a.) What is u_ser:�denned function? Describe different types. of
user-defined function in C.
(b) Differentiate between actual and formal parameters. 3
(c) Write -a program in C to chec_k whether a number is Qdd or even. 5'
(d) Define structure and urtion. 2
[Please turn-over
Marks
5. (�) What is one-dimensional array? How to declare and init.ialize an 4
one-dimensioI1al array in C language?
(b) Define null character in C string. Describe some string handling 2+S==7
functious with example.
(c) Write a C program to calculate the area and perimeter of a .5
rec.tangle.

6. (a) Define pointer. Describe declaration and initialization of a 4


point�r variable. �«, · •

(b) Explain fundamental data types used in C Iangµage. 5


(c) Write a C prograrn fo calculate th� factorial of an integer 5
number,
(d) Write- d.own the rules for declaring variables.

7. .(a) What is file? Describe different file opening mode. 5


�-··-
(b) Write down the dJ{ferenc:e between, �rintf() and/printf( ).
(c) Write a program to append the,n constants of one file to another �
file.

", .

(a) Write down the genernl format and flowchart of the following:� 8

(I) lf .......... else statement�.

(ii) e.lse if ladder.


(bj W11iu are the differences between while loop and do 4
.............while loop?
(C) Wrire a program in C that determrnes l ·hcther a number is 4
even or odd.
6. (U). What is ,inay? l -fow 'th-e one and t,;.,o dimensional an-ays· are 2+2?4
declared in C?
(b) What is pointer? Declare and ini.tialize i::l pointer variable. 4·
(cJ Briefly explain the terms •call-by.vafae' and 'c;alJ-by-reference;. 4
(dJ Write a C program to frnd the factorfa[ value of an integer

7.
t.is i ng rec ursi"-01�.
(ol Wlia_t ar·e the types of files in C programming? Mention their
-----
\ \ .\

111odt1:s.
(b) Write a C _program (hat read� ten integer numbers stored in a 6
file and compute. the summation of the numbers.
(t') Write a program iri C to sort ten numbers in ascending order. 6

��� �
B,Sc. (HONS.) IN ECE,PARl-1 FI�?S'f §E1'1E$T.t:R lEXAMlNATION, 2014
,I
ECfl-1�,5 • ,.. • '

Fun,huneutati§ o,f CompllRieir & Pmgir�mming.


Time--J hours
Fu J l rnarks-8D

[l'{lJ.--T/1e figttu.ts ii) i he tighr margfr1- ;ndicatefult mark.t Answer any five of th�
_fa;llow/ng qmsiions.]
Marks
l. (t�---1:vrrnt is a computer'! De..scribe, �hrce different types. of
· cornpute1, b1i<.'f1y . � lf
. �b"(lJerine software.. What arc the differences between system .C3..
0

software 8? appiic.ation software? . 5


C- ;,.,,What does the ierm bus mi;{l.fl in computer? What arc the
/ d.iffcrc11t types of buses? -
)�r l�at (iO ;F;C-t:;i1 {r-.• t:O!l1F·:i�.er j_)Vtipnerc;s-',r Na.me three 2
J • � -· I . I • -.
l
'{J �'()�!

_,; lei cnt compui.Cr p.ei-iphcrs.ls.


./
,
�.,._;<"2- ,,,.·, ,} 5,i•v.;s :n .... -ii.:fihe fr,1!0 vi�g co<le
'
1 6 lp
• i, sen; (ii) Unicode; (iil} BCD. I_

( ·) r,dd the foilqwing 11umbers and convert the result in equivalent


t,·::.-:ad1;,cimal numbf'r: (?:2·53)8 � (2A:5D)16 = (?) 16
le:) What is the signifiermce of 2's c.ompien:ient method? Subtrac:t
('71)w from (29) )() using 2's complement metho,d.
3. (a) Di�cuss the workrng prir1ciplit of a Cathode Ray Tube ([;R.T) 6
m9nitor.
(b) What do you mca·u by memory in a compu· ter7 De·scribe 4
•• • I

volatile and no:n-volatilr- rnem�r y !:wiefly.


4,C)' Wha:t are ihe advantages & disadvantages of an ��k-jet f)rinter? 4
(d \V�at is an operating system?J::��-'?� two upcrating systems.
4. (er) Wri�c dov;;··;h� -�;ncral form and fl;�
·cha:rt. �f�e>lse ... .. if
ladder.
( b) State De Morgan's rule. What will be the re.suit if vve apply 2
De Morgan's rule t the foliov-._ing ex.pfes·si�ns:
tr) ! (x &&y II z)
(ii) ! (x. < = O 11 ! condition).
(c) De!fae entry an.d exit controlled loops. 4
. jfP;!,ritc. a program in C to check whether a number is e-ven o_ r _G f
__ odd. .
Marks
:© (a) Mention: the general structute of C programming language; $
{h) What is keyword? State the rules for naming identifier? Give.
example in each c.asc.
5
·1+5=6 t(p
., ·
(c) W1,ar do you mean by : s V
(() local variable1 global vai"iahle
(ii) symax error, logical error?
(u) What is pointer yarlc:blc? Declare and initialize a pointer 4
vadable.
{b) Write a C program. to find the sum of the seri.es � 6
l +2+3+e!.'.·........+ I 0.
(c) · 'rite a·Cprogram to find the area o:f a c.irde. 6
- ' -1f,)yn.'Wbac is foi:i ctio� definitio1�? Write· d�wn �Y ge;ie�al for:rn of 4 �
function definitiori.
(h) Define frrntt1rin prototype. WhM &-.e forrna! & actual J
pa ··arrn::·tcrs?
fr) Write .a propsa.m in C rn computr= the '.sum of the digirs of a
given 1mcger number.
5 s
yJ-- Write down the general for:m ,qf prir:n f and scan_ f statement 4 ·t.,
with an example of each.·
�J-�i;�i.i�:t;{��f¥��;���t&U\��'1�:?N�,�::��..�.;.�.:.s. ..J:: �-:_ ·=, ..; ='I

H.Sc (HONS.) ECF P.-\RT� 9 Fffi,ST SEJ\1.EST.ER, EXAl\ilNATION9 2015


ECJE-]0$
(Fundarncntaflos of C0:mput�r a!_id Programmh'\g)
Timc--3 hours
Full marks-80
/.\" B "--The figures 111 !he right mw:gin indt�ate full mark::i� Answer any fire of
rhe.fdlowing quern:ons.]
. Marks
..,....
,
i. ,·,,. tef DnA· the 1-).lGCk diagn.1.m of 'a computrr 'a!ld menrion the 5
t'.t!nction� ot' t:.:-ch unit.
V./lujt [,g n11::arn by. · com put er generation'? How many 7
gencrntium; ,in:: there till now? Wrire .down the sal'ient
leaturcs ofr ;,h generation.
(c) 1\Vh!.lt do the· !'oliowing nan�(;)S s.tand for:.- 4•
(i) ENlAC - 't1�V\£C },JUl-\1�ouca.Jl -r,'\,\-e1rw..l�f:L ClYtet C�lc.J.:dct.l ff
o.
m1 E�,s��\.C. ·-TJ@,dv�t::t,;\__;e, ,u�11:"'ifd s��r;-__o-'ly??{'"�\-(t,Q.b.c. C�?1,�b=.� _
(iii/ Ll-\lV/\�_ .... \J'ef\,w@.nr;.:cJc fh,.J:�111.aklt:. 9,cVl't\ilt�.ke\i't l
I ______.. • -1 J

.. -

Tii( Add tlie follo\;.ing numbers and convert the result 111 G
l!ljtl'\ i!lt'n! Ol'l�t_l !lUlllber (27,42)g + (JA-4n)i5 = (?)g,

.,<; :Sulvtract (,38)1;_; from (5�)10 using 2's .complement method. 5

3. r1.11 Di 'Iing.11i:ih bU'-.•.:(·;: compiler and ihterpret�r. 3


% WhJt is ROM':' D1.s.cribe djfforent rypes of-ROM.. 5

(,,,fJ .J,

-\. \\'hat do you n:c,1-n byop�nnor? Cla!::si(y them,


lt,lj 4
rb1 W.h/t_do yoti'lri ·Jo.by . �scan f()'and ·print f()' in.C lan,gttage? 4
.
t'c) \Vnrc a program tu add two floating point nun:ibers inputted by 5
S('m1 f( ) fot1ction an J 'show·
. the 're·su!t. •
..,.,---
fdJ Wrile clo1;,.11 sonic 1mpc1I1ant foarurcs of C programmi ng . J
[PleasP. turn oi·er
I;
4

(c.) ·w�1t<;; claw;,;. r,1.r. genei-al tr•j•;i1 :i;)Q J('U-C,(U/.1.'t Oi if,,,.,6�e


&�81.i'�ll.1f.\D.t>

ri�i Disting1.1isl1 betvv6(: i c-.o.unl.f:,l >:!i.J;1 roUtd ,md sentinel 4


control fed loops.
6. ro.) Whe.t do ycm mean. by Ls,op? \Ytiki ri. C prngrnm usi.n:g DO 2+.3=5
Loop
(t,}. D;r,Stribe )\fested conirnJ �trn�tm1;; t):,mg ::iN1r6pi1-oite
example.
i1•) \7/hat do :Nu 1111;:an. by n:rur.1 ryr:-e'? •tihy w.e q�:.., ,·oid i1.&- a
rdurn typt?
(�) '.Vrite •l:L "ltnple progmm !·0 �Yld f?tsl fiv"' ,::.<1;·,:-.i:ctn:hre 5.
re. ;'llb•�r:.;
\!VJ;;{! LV.) y,:iu ffG.,::I<. by dcJ.t," C\ej ·�\-'h..ti
,.,"'::;�·rt i ::r1·fi'.
4
1

.f.

You might also like