Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
3rd semester Computer Science and Information Science Engg (2013 December) Question Papers
1. 1q
1OMAT31
USN
Third Semester B.E. Degree Examination, Dec.2013 /Jan.20l4
Engineering Mathematics
Time: 3 hrs.
- lll
Max. Marks:100
Note: Answer FIVEfull
| 'a.
6)
f(x)= lxl in (-n.n).
hence deduce that
(06 Marks)
8 fr(2n-l)r'
a
b.
o
o
EE
Find the Fourier series expansion of the function
n2gl
,'
-.
o
o
(g
questions, selecting
at least TWO questions from euch part.
PART _ A
urd h"n.e
c.
f(x) = (* - 1)' in the interval
'
Obtain the half-range cosine series for the function,
jnq* that n2 = *{+ * * * +.
}
u'3'5',)
0<x<
1
(07 Marks)
Compute the constant term and frst two harmonics of the Fourier series of
(x)
given by,
(07 Marks)
x
G9
0
1.0
TE
;J
J
f(x)
EB
ol
2n
TC
=r)
-t
o0'
troo
1.4
1.9
5x
1.5
a.
Obtain the Fourier cosine translorm
b.
FO
Find the Fourier transform
o>
a2
o=
1.0
;J
J
"
r.7
2n
1.2
4n
of f(x)
'
ol itx; = I[r- -
x:
t 0
oO
=
(06 Marks)
--1 .
1+x'
Zxcosx-sinx
for lxl <
forlxl >
----------r----0
x'
-
X,
(07 Marks)
50tr
c.
Find the inverse Fourier sine transform of
-v
>6
a-
Obtain the various possible solutions of two dimensional Laplace's equation, u** * ur, = 0
by the method of sepaiation of variables.
(07 Marks)
-ao
!Q
a- 6-
(07 Marks)
#r.
. _, o-u o-u
Solve the one.dimensional wave equation, C': . --,
a)
b.
^)
dxVA
o-i
,; .9
conditions
(i)
u(0,
t) : u(1,0 : 0
(ii)
dt'
0'< x,< / under the following
VL
u(x, 0)
:
atE
(iiD
!o
6.v
>'!
oolo0
o=
c.
4 a.
o
o
o
(07 Marks)
:
.au (x.0)
flx) and
f
= 0.
(06 Marks)
Find the best values of a, b, c, if the equation
fo llo wing observations.
x
z
P
= o.
b.
c.
where uo is constant
Obtain the D'Almbert's solution of the wave equation un = C2u** subject to the conditions
u(x" 0)
:o
VL
o
t<
-' ..i
ff{*,o)
T
I
2
y=a+bx+cx2
is to fit most closely to the
(07 Marks)
J
4
5
v 10 t2 13 t6 t9
Solve the following by graphical method to maximize z = 50x + 60y subject to the
constraints,2x+ 3y<1500, 3x+2y<1500, 0( x <400 and 0<y<400.
(06 Marks)
By using Simplex method, maximize P=4xr -2xr-x. subject to the constraints,
xr +x2 *X. (3,2xr+Zxr*X. ( 4,xr-x, <0, X, )0 and xz )0.
(07 Marks)
2. 1OMAT31
5a.
b.
PART _ B
Using Newton-Raphson method, find a real root of xsinx+cosx = 0 nearer to n, carryout
three iterations upto 4-decimals
(07 Marks)
Find the largest eigen value and the corresponding eigen vector of the matrix,
places.
lz -l
l.^.1ol
-^' -^'
|
10
',
-l 2l
I
By using the power method by taking the initial vector ur [t
o.
1]r carryout 5-iterationi.
$7 Marks)
method:
3x+4y+102=58
2x+8y -z=24;
Solve the following system of equations by Relaxation
12x+
6 a.
t
y-tz=31 ;
(06Marks)
ls tne ro[owl
localltv
conducted in a slum localit reveaN the followins informatiton as classified below,
nducted m
'x' llnder 10 t0 -20 20-30 30-40 40-50
Income oer dav in Rupees
45
20
115
2i0
115
Numbers of persons 'y'
(07 Marks)
Estimate the;probable number of persons in the income group VO:to 25.
(x),as a polynomials in x for the data given below by Using the Newton's divided
Determine
(07 Marks)
difference formula.
l0
4
x
2
5,,
8
6
f(x) 10 96 196 350 868 1746
1
Evaluate
by usinf'simpson's
by taking 6 - equal strips and hence
A
,,,,'
c.
f--I-4,
jl+x'
[,t;"t'"
deduce an approximate value
74.
b.
log'; 2';
^)
(06 Marks)
^)
+ = 4*,
dt- 0x0) : x(4 - x) by taking h,:ir,-a :
u(x,
Solve the wave equation,
sub.lect
!.,5
+
'aAx- = +
ano
and
K.:
to u(0, t)
:
0, u(4, t)
:
0, u1(x, 0)
unto' ,steps.
:
0 and
(07 Marks)
subject to the conditions, u(0,
Solve numerically the equalio,
t>0
c.
of
t)
: 0:
u(1, t),
I
u(x,0)= qinnx, 0<x<1, carryout the computationfortwo levels taking h =a
I
, ,,
-
(07 Marks)
16
- ',..,'"
Solve u* * u,, = 0 in the following square region with the boundary conditions as
'"t
indi,ryd in the Fig. Q7 (c).
(06 Marks)
Jt:o oo 1oo 50
1
20
Fig. Q7 (c)
30
0000
8a.
Find the z-transform
ol (i)
(iD
sinh n0
b.
Find the inverse z-transform
c.
Solve the difference
or,
coshn0
222 +32
(z+2)(z- 4)
equation, yn*z * 6y,*, * 9yn =2"
with yo = Yr = 0 by using z-transform.
(ur) n-
(07 Marks)
(06 Marks)
(07 Marks)
{<*r.*X<
2 of2
3. MATDIP3Ol
USN
Third Semester B,E. Degree Examination,
Dec.2013 lJan.20l{
Advanced Mathematics -
I
Time: 3 hrs.
Max. Marks:10CI,
Note: Answer any
;',
(J
(J
I , a:' Express the complex number (t +iXl-+ 3i) in the form x + iy.
o
,
a
b.
o
()
L
E9
bor
de
-Xn
-*l
too
.=N
oXJ
oEi
-O
=!
o2
a=
c.
.Y
a6
6r
E(6
-?()
or=
o. 6.
6E,
LO
JE
o.i (P
>'
ooo
cbo
Is(x -l) (i-tf
AyAx
z
o
(07 Marks)
1).
(06 Marks)
(07 Marks)
x5.
(07 Marks)
.
dxAy
3*y:l,find+.
4 a. Ifu=xlogxywherext+yt+ .
dx
(o6Marks)
z: (x, y) and x = e" +e-u andy = e-" -eu, prove that 5 -- =x.J -y- :.(07 Marks)
y, & N
;, u,,.
^.'c. If u=x+3y2 * z',v=4x2yz, w= 222 -xy, findthe*r".oi,99{t') at(1,-1,0,).
-
b.
If
a$.y.2)
5 a.
::'
Obtain the reduction lormula
,,,,,, 'eductron
,,,
b.
Evaluate
u, v'dx
l+
1?
(
lor
fo J smnx dx .
I
Marks)
" ''
,,,"',
,
(06 Marks)
,"'.,{07 Marks)
-x'
o
,,::'
o
o
(07 Marks)
- 6 in powers of (x -
b. Using Maclaurin's series, expand tan x:,lto the term containing
c. If Z:"t + ,u' - 3axy then prove 161 !J- = :':
.,.
(06 Marks)
2x +3).]
Using Taylor's theorem, expresS'the polynomial"")xt +7x2 + x
Evaluate
-N
(07 Marks)
rlllrirl
Expand coss 0 in a series of cosines multiples of 0.
(J=
go
(-)
''
2 a. Find the nth derivative of sin(ax + b).
b. Ify: (sin-r x)2, shawthat (1-r')yn*, -(2n+l)xy,*r -n2yn =0.
. I
c. Findthenlhderivativeof I r +, - -3t2 Il.
i 3 a-
(06 Marks)
fl7t
oj
a=
,,; .,,',,,
,.. , "(3-42i)'
o()
oro
b0tr
FIVEfull
questions.
IIfr,
+ eY)dydx.
(oz M+rko)
l3
<
6a.
lll
Evaluate
JJ Je..'.'Oxdydz.
000
(06 Marks)
l/
1)
"i t2J'
b.
Find the value
c.
Prove that B(m,n)
lf
=@.
l(m + n)
(07 Marks)
(07 Marks)
4. -l
MATDIP3Ol
7 a. Solve t
b.
=
""-"
+x'
-*' -y'
Solve 7y
'e."
(06 Marks)
.
which is homogeneous in x and y.
(07 Marks)
tffi,;1;u*1_ =e'*(x+1)'
ffi,,ft
i.'
::,.b..
.::..
,d}q3
*--,
solve
,=
ffi"ut,
t,:==
(06 Marks)
(07 Marks)
(07 Marks)
{<{<**{.
fl3'",t.
t
.$ 4,
' .ii :il
- .&
't
i
"I
i
f"!
l
r#/:
$
.:::i'rr:il:a6#*&/rryh.
::::t:
d"Yv
h
.+'
f -.f'
i: ,S
-J
W
f :I
q"
,
u{
u
*(P
=.-iu
=';*J
,l=,.1
a
'":":""
!'
'At
vi''
,,"{Fr#'
""
::
+'
-y3
* oteY..u,r
'q:a"'a::
fl'I
.tr
*"
'::::
,::...,,:
.;;;::
s
*'
''t:"':'
-&1
..........
t
;
..
.!
r.."r,'t'"'!:'t
t:,::'
q"1.-J't,
'ttttt"'"*'I'
'
.::.
.{fl .:
..::::.
&'!"
2
of2
::'
5. 10cs32
USN
Third Semester B.E. Degree Examination, Dec.2013 /Jan.20l4
Electronic Gircuits
Time: 3 hrs.
Max. Marks:100
Note: Answer FIVE full questions, selecting
at least TWO questions from each part,
d
o
o
g
PART * A
a.
Explain the criteria for selecting a suitable operating point and factors affecting the stability.
(08 Marks)
Determine the operating point for a fixed bias circuit shown in Fig.Ql1b;. Given B : 100 and
VeE : 0.7V. Draw the load line.
E
(!
C)
o
Va =lsv
ER
50G,9
-.o
o0'
I
Eoo
.=N
9#
-O
-!
3z
Fig.Q1(b)
(07 Marks)
c.
Explain transistor as a switch.
a.
;!i
(06 Marks)
What are the differences between BJTs and FETs?
(04 Marks)
Explain the working of a CMOS inverter.
Explain the construction, working and principle of operation of an n-channel JFET.lto Marks)
o()
o'tf
b0i
b.
c.
-s
'O
..o
cd
a.
or=
b.
^X
c.
oi.
oE
AE
LO
5.v
>,!
bo"
=bo
o=
E-3
F>
VL
=o
o
a.
b.
(06 Marks)
Explain the classification of optoelectronic devices.
Define the following terms:
Responsivity
ii) NEP
(04 Marks)
iii) Response time
iv) Quantum efficiency
Explain the working of cathode ray tube with a neat diagram. What are the advantages and
(10 Marks)
disadvantages of CRT?
i)
What is the need for cascading amplifier? Explain two stage cascaded amplifier with a block
(08 Marks)
diagram.
Derive the expressions for: i) Current gain
ii) Input impedance
(12 Marks)
iii) Voltage gain
iv) Output admittance
t<
-i 6i
(-)
Z
o
E
a.
b.
c.
(05 Marks)
PART _ B
Briefly explain the classification of amplifier based on input and output parameter of interest
(12 Marks)
[Vi, Vo, Iiand 16].
(04 Marks)
With a neat block diagram, explain amplifier with negative feed back.
Calculate the values of harmonic distortion components for an output signal having an
amplitude of 5V at fundamental frequency, second harmonic component of 0.5V, thkd
harmonic component of 0.2V and fourth harmonic component of 0.05V and find total
harmonic distortion.
(04 Marks)
6. 10cs32
6 a.
b.
c.
What are necessary conditions for loop gain and phase shift for sustained oscillations
according to Barkhausen criterion?
(04 Marks)
Explain the working of an Astable multivibrator using IC 555 timer with circuit diagram and
relevant waveforms.
(08 Marks)
Explain the working of RC low pass RC high pass circuit.
(08 Mdrks)
:
7 a.
b.
c.
a.
b.
c.
Explain the steps involved in custom design of mains transformer.
What are SMPS? Compare linear power supplies with SMPS.
Explain the working of three terminal voltage regulators.
(06 Marks)
(07 Marks)
(07 Marks)
What should be the slew rate choosen for an OPAMP as an inverting amplifier configuration
with gain of l'O,when input is a sinusoidal signal with peak to peak value of 2V and highest
frequency expec{ed is 50 Hz?
(04 Marks)
Explain the working:of an OPAMP window comparator with circuit diagram. (08 Marks)
Explain the lead and lag type of phase shifter.
(08 Marks)
{<*{<*tr*
..
i
....,)t.
..'
i
::1
2 of2
,:
7. 10cs33
USN
Third Semester B.E. Degree Examination, Dec. 20l3lJan.2014
Logic Design
Time: 3 hrs.
Max. Marks:100
Note: Answer FIVEfull questions, selecting
atleast TWO questions from esch part.
(J
o
o
!
a
(!
(!
()
(.)
I
oX
PART _ A
I a. With the aid of the circuit diagram, explain the operation of 2 - input TTL NAND gate._
b.
c.
co
troa
.=N
Yd)
otr
-<()
2 a.
b.
rs
()(l)
Using Q - M method, ,lrnpti1y the expressions (A, B, C, D) : ,(0, 3, 5,6,7 ll, lD).Write
the gate diagram for the simplified expression using NAND - NAND gates.
(10
Marks)
A digital system is to be designed in which the month of the year is given as input is four bit
form. The month January is represented as '0000' February'0001' and so on. The output of
the system should be '1' corresponding to the input of the month containing 31 days or
otherwise it is '0' consider the excess numbers in the input beyond '1011' as don't care
conditions for system of four variables (A. B- C. D) find the lollowing :
i)
ii)
a0c
.G
iii)
!d
iv)
3o
'Ca
OE
s5.
tro.
oj
9E
1o
alE
LO
x.9
Y,
i50
U*o
tr>
9L
o
.i
(08 Marks)
What are universal gates? Implement the following function using universal gates only
(06 Marks)
((a + n)C )D
Write the truth table of the logic circuit having 3 input A:,,,B and C and output output
expressed as y=ABC+ABC . Also simplify the exsression using Boolean expression
(06 Marks)
and implement the logic circuit using NAND gates?
3 a.
b.
c.
4 ab.
c.
o.i
Boolean expression in !m and tm form
Write the truth table
Using K - map. simplify the Boolean expression of canonical minterm for
Implement the simplified equation using NAND - NAND gates.
*s:-
ft,!- c
;6
fr,Y
l;
.1_*7
(06
What are static hazards? How to design hazards free circuit? Explainwith an example.
-
(06 Marks)
(08 Marks)
bit magnitude comparator.
Draw the logic diagram of clock D
- flip/flop write its truth table and characteristic
equation, state diagram and excitation table, what is the draw back JK flip/flop. (10 Marks)
(05 Marks)
Differentiate between combinational circuit and sequential circuits.
Show how a SR flip/flop can be converted into T - flip/flop.
(05 Marks)
PART
()
X*l
Write a 4: 1 MUX verilog program using conditional 'assign' and 'case' statement.
Explain IV
-
B
o
z
5 a. Using negative edge triggered JK flipiflop,
o
b.
c.
'er..
draw the logic diagram of a 4-bit
serial-in-serial-out shift register. Draw the waveform to shift the binary number 10i0 into
(08 Marks)
this register. Also draw the waveform for 4 clock transistor when J: K: 0.
(06 Marks)
Explain the working of mod - 4 ring counter.
Explain with a neat diagram, how shift register can be applied for serial addition. (06 Marks)
i
I
7
8. 10cs33
6 a.
b.
7 a.
b.
With the help of neat block diagram and timing diagram, explain the working of a mod -16
(08 Marks)
ripple counter constructed using the edge triggered JK- flip/flop.
Designasynchronous counterforthe sequence 0 -+4 + 1-+ 2-+6 -+ 0 +4, using SR
flip-fIop.
(12 Marks)
Design a sequence detector that receives bindery data stream as its input, X and signals
when a combinations '011' arrives at the input by making its output. Y high which otherwise
remain line consider data is coming from left, i. e the first bit to be identified is l. Second
(14 Marks)
1 and third 0 from the input sequence. Design mealy model?
(06 Marks)
Realize the sequential circuit for the state diagram.
*;l
"L;
0
'tTl ,*=
I
, : Fie. Q7(b)
8a.
b.
c.
Explain 2-bit simultaneous A./D converter.
(10 Marks)
What is binary ladder? Explain the binary ladder with a digital input of 1000. (06 Marks)
What is accuracy and resolution of the D/A converter? What is the resolution of a 12bitDlA
converter which uses binary ladder? If the full scale output is + 10 V, what is the resolution
in volts?
(04 Marks)
E{<***
2 of2
9. 10cs34
USN
Third Semester B.E. Degree Examination, Dec. 2Dl3/Jan.2Ol4
Discrete Mathematical Structures
Time: 3 hrs.
Max. Marks:100
Note: Answer FIVE
o
o
I a.
(.)
b.
E
Cq
o
L
BE
69
cjl
j
'=+
=eo
PART
-A
Define power set of a set. Determine power sets of the following sets.
B: {0, 1,{0}}.
{a,
Using laws of set theory show that (A n B) U [Bn ((C n D) U (C n D))]
A=
{b}}
:
(04 Marks)
B n (AU C).
c. In a surve 1r of
()
3,
full
questions, selecting
d.
o:f
260 college students, the following data were obtai ned; 64 [:1^[lT]
Mathematics eourse, 94 had take CS course, 58 had take EC course. 28 had taken both
Mathematics and F,C course. 26 had taken both Mathematics and CS course, 22 had taken
both CS and EC course, and 14 had taken all three types of courses. Determine :
i) How many of these students had taken none of the three courses?
ii) How many had taken,only CS course?
(06 Marks)
An integer is selected at random from 3 through 17 inclusive. If A is the event that a number
divisible by 3 is chosen, and B is the even that the number exceeds 10. Determine Pr(A),
Pr(B), Pr(A [) B) and Pr(A U B).
(05 Marks)
-O
-!
o>
o2
2 a.
a::
oO
c
b.
26
ie
:E
o''
9d
3o
lr=
a
!o
5."
>.h
c.
d.
3 a.
Write down the converse, inverse and contrapositive of the following statement, for which
the set of real numbers is the universe. Also indicate their truth values. V*[ (x>3) -+ 1xL911.
b.
Write the following propositions in symbolic form and find its negation. For all x, if x is odd
then x2 * 1 is even.
(04 Marks)
Let p(x), q(x) and r(x) be open statements, determine whethe2ffii
valid or
, (rS;;
V, [p(x) -+ q(x)
ll-r.
c.
co- cI)
(06 Marks)
not
]
gd)
F>
(-)
:()
Let p, q be primitive statements for whieh implication p -) q is false. Determine the truth
valuescfthe following: i)p n qii) -rpvq iii) q +piv) --rq+ -1p.
(05Marks)
By constructing truth table. Show that the compound propositions p (: q v r) and
^
p v (q n r r) are not logically equivalent.
(05 Marks)
Prove that (:p v q) (p
q)) ep q. Hence deduce that (-r p q) v (p v (p v q)) c>
^ ^(pn
^
^
p v q.
(05 Marks)
Show that R v S follows logically from the premises. C v D, (C v D) -+ --lH,
-r H -+ (A n -r B) and (A n -r B) -+ R v S.
(05 Marks)
d.
ar
V" I q1x) -+ r(x) I
'LM
.'.v*[ p(x) -+ r(x)].
i
;fl
i.;
'rkt
6
4 a.
', I
'.,
" , ,.
1
(06 Marks)
Give a direct proof of he statement : "The square of an odd intNfoen-e,4dbi*eger"
sn*eflQsXllTe$er
l:j;;V
o
Z
d-, ,1
Using mathematical induction, prove that
4n. (n'-
.
(04 Marks)
7) for all positive integers n > 6.
(06 Marks)
L
L
FortheFibonaccisequenceFe,Fr,Fz- - - -. Prove that
c.
Find an explicit formula for
D.
an
:
on
-l
*
n, ar
:
pn
=*[[y)'
4 for n> 2.
[+]']
,or Marks)
(06 Marks)
10. 10cs34
PART _ B
5 a.
b.
c.
d.
Define the Cartesian product of two sets. For any non - empty sets A, B and C prove that
A x (B UC) : (A x B) l-J (A x C).
(05 Marks)
Define the fbllowing with one example fbr each i) Function ii) one - to one function iii) on
to function.
(06 Marks)
State the pigeonhole principle. An office employs 13 clerks. Show that at least.2 of them
will have birthdays during the same month of the year.
(04 Marks)
. gandg. f.
Letf : R->R, g:R-+Rbedefinedbyf(x):x2, andg(x):x+5. Determine f
Show that the composition of two functions is not commutative.
(05 Marks)
a. LetA: {1,2,3,4, andletRtherelationdefinedbyR: {(x, y) l*, y e A, x<y}.
Determine whether R is reflexive, symmetric antisymmetric, or transitive.
(05 Marks)
b. What is partition of a set. If R : {(1, 1), (1,2), (2,7'), (2,2), (3, 4), (4,3), (3, 3), (4, 4)}
defined on the set A : U, 2, 3,4). Determine the partition induced.
(05 Marks)
c. Definepartial order. IfRisarelationonA:{1.2.3.4}definedbyXRYifxly.Provethar
(A, R) is a POSET. Draw its Hasse diagram.
(06 Marks)
d. Let A : {2, 3, 4, 6, 8, 12,24} and let < denotes the partial order of divisibility that is x < y
means xly. Let B : {4, 6,121. Determine
i) All upper bounds of B
ii) All lower bounds of B
:
:
iii)
iv)
Least upper bound of B
Greatest lower bound of B.
(04 Marks)
a.
Define abelian group. Prove that a group C is aiifAn iff (ab)2 : a'b' for all a, b, e G.
b.
If H and K
c.
,
il:Hl
are subgroups:;ru ,.orp G. Prove ,nu,
G.
O K is also a sub group
"f [3]
Define homomarphism anod isomorphism in group. Let f be homomorphism from a group
G1 to group G2. Prove that
it If er is the identity in Gr and e: is the identity in Gz. then (e1)': e2
ii) (a-r) =,[(a)]-' for all a e Gr.
(08 Marks)
:
a.
An encoding function E:27, -+ Z)is given by the generator matrix
[rollol
G=l r 0 I
L0
:
I
l.l
i) Determine all the code words
ii) Find the associated parity - check matrix H
b.
c.
iii) UseHtodecodereceivedwords:1 1 101, 1 101 1.
(07 Marks)
A binary symmetric channel has probability P : 0.05 of incorrect transmission. If the word
C : 01 101 1 101 is transmitted, what is the probability that i) single error occurs ii) a double
error occurs iii) a triple error occurs iv) tluee errors occur no two of them consecutive?
Define a ring. In a ring (R,
r, 0) tbr all a, b e R, prove that
i) a.0:0'a:0
ii) a(- b) : (- a) b: - (ab).
(08 Marks)
(05 Marks)
{<*{<rftr<
2
of2
11. 06cs35
USN
(,)
o
(.)
,
Third Semester B.E. Degree Examination, Dec.2013 I Jan.2Ol,4
Data Structures with G
Time: 3 hrs.
Max. Marks:100
6
Note: Answer ony FIVEfull questions, selecting atleast TWO questionfrom
a.
I
(.)
ox
bo-y2
oo
1l
troo
d .i-
;...,, (06 Marks)
(04 Marks)
What,is,rneant by rvalue and [value expression? Give examples. '";
Distinguish,,,,,between static and dynamic memory allocation. With' syntax, explain four
dynamic memory allocation functions.
(10 Marks)
3a.
Define stack. List atleast f"r. rriii"ations of r,u.f..
b. Write an algorithm for evaluating apo$ fii expression and trace it on 123 +
. ",ii.,; i'-!
c. Write C functions for implementi_-4gpiimitive stack operations.
ccd
,6
OE
b.
o.L
or!
o=
atC
(05 Marks)
321 - + *.
(09Marks)
(07 Marks)
What is recursion? Evaluate fib(4), that is fin{ing 4'h term of Fibonacci sequence using
recursion and iteration. Which is better?
(08 Marks)
Write the static implementation of priority queue in C language. With illustration, explain
major limitation of suqh a queue.
(12 Marks)
PART - B
Give the str.uctural features of a linked list. Discuss how an"'affay, can be used to store a
linked list, ,.
(05 Marks)
Givgn a singly linked list with plist as the external pointer, write an algorithm to insert a
new.'node to the end of the list. Assume nodes hold integers.
(05 Marks)
c. FIow is a stack implemented using linked list? Write C program for the same. (10 Marks)
>(H
ooo
oll
C
o=
*o
tr>
6
*' What is a circularly linked list? Write algorithm for merging two circularly linked lists.
,,.
-N
."
0,
Ol
Z
*
a.
lo
rJ<
equal. Use structure data type
Write a C program to merge two files of integers to produce a third file.
(06 Marks)
c. Write a C program to concatenate First name and Last name of a person without using any
library function.
(08 Marks)
b0tr
=o
5L
:
i)" .selection ii) Indirection iii) Address.
b.
a,)
oC)
PART - A
Write the syntax and usage of the following operators in C language
::::",'
2 a. Write an user defiqqd function in C to find if two fractions'are
Y(]
og
-c
a=
port.
b.
c.
o
6e
6
eerch
"b.
(07 &X,arks)
Write the algorithm for deleting the first occurrence of a given valve from a doubly. linked
list.
,ll
list.
(08 Marks)
(05 Marks)
c.
Discuss how to implement a queue using circular linked
b.
Define complete binary tree and almost complete binary tree. Give examples. (05 Marks)
With suitable example, explain implicit array representation of binary search tree. (05 Marks)
What is a binary search tree? Write an algorithm to construct a binary search tree. (10 Marks)
la.
c.
rrur"rr,n*dff-l';
b. write short notes on : i) circular queue ii) Efficiency of recursion.
(ff
a.
What is tree traversing? Explain the standard methods available for tree
Tfl*,
12. 10cs36
USN
Third Semester B.E. Degree Examination, Dec.2013 lJan.2Dl4
Object Oriented Programming with G++
:.:::.
l"''''"'l'll"'
.
Time:3 hrs.
d
o
o
o"
la.
c.
ox
J.
dv
=rl
-*l
coo
.=N
gd
oJtr
-C(l)
*.a
2a.
b.
c.
3a.
aX
o()
6O
b.
c.
.
PART _ A
tnlt
-n
(08 Marks)
features of object oriented programming.
What is,'inline function? Explain with an example. Mention its advantages. (06 Marks)
What is function overloading? Write a program to swap two inleger and two float number
using function overloading.
(06 Marks)
Exptfu various
b.
o
o
Max. Marks,;100
Note: Answer FIVE full questions, selecting
at least TWO iuestions from each parl
What is class? Write a program to create a class called employee which consists name. desg.
ecode and salary as a data member and read, write as a function member, using this class to
read and print 10 employee information.
(08 Marks)
What is constructor? Mention its types. Explain paiameterized constructor with an example.
(06 Marks)
Explain three access specifiers.
(06 Marks)
Why friend function is required? Write a program to add two complex number using friend
function.
(08 Marks)
(06 Marks)
example.
Explain generic function with an
Write a program to overload * * operator.
(06 Marks)
boi
.G
-?o
'Ca
OE
^X
osw
oj
6=
<o
atE
C.F
(sE
!O
>'q
4a.
Mention types of inheritanCa. Explain multiple and multilevel inheritance with example.
b.
(08 Marks)
(06 Marks)
c.
(06 Marks)
5a.
b.
c.
PART _ B
Explain'fu order of innovocation of constructor
and destructor with an example.
Exp-lain with an example virtual base class.
"E plain passing parameter to base
class.
,Krt
tr>
6 .a-. 'Difference between early binding and late binding.
, b. What is virtual functioni Explain with an example.
: c. Explain the abstract class with an ex-ample.
J<
- c'i
7 a.
b.
bo-
o=
o. ;j
=o
9-
()
o
Z
o
a
c.
8 a.
b.
c.
ar
cfre#?sieL
LcEFt.d&r{y
(10 Marks)
(05 Marks)
(05 Marks)
Marks)
"(06
(08 Marks)
(06 Marks)
What are the flags that associated with the file operation?
Explain the following functions:
i) setfill( )
ii) width(
iii) precision(
iv) setiosflags( )
Mention the name of file movement pointer. Explain each.
(06 Marks)
Explain C+* exception handling function with example.
What is vector? Explain function of a vector.
Write a program to create a list and sorting the elements of the list.
(08 Marks)
(06 Marks)
(06 Marks)
)
)
(08 Marks)
(06 Marks)
13. 06cs36
USN
Third Semester B.E. Degree Examination, Dec. 20l3lJan.2Ol4
UNIX and Shell Programming
Time: 3 hrs.
Max. Marks:100
Notez Answer FIVEfull questions, selecting
taaacuJt TWO questions from yuL ra part.
atleost , 77 v al ucJaaarf ,J J t ltIII eoch put a.
o
PART
.9
!
a
1 a.
-A
With a neat diagram, explain the relation ship between the Kernel and the shell of IINIX.
(07 Marks)
b.
o
o
!
c.
ox
NV
-lol)
cca
d$
type.
(07 Marks)
What is parent - child relationship? With the help of diagram explain the UNIX file system.
(06 IVlarks)
2 a.
b.
c'
List and explain any four commands which are used for handling ordinary
Explain each column of o,iltput Ls - I command.
what is editor? Explain the tluee modes of vi editor.
3 a.
Explain the following :
i) Shell wild cards ii) /dev/null and /dev /tty.
Define the term process. Explain mechanism of process creation in
Explain any four L|NIX environrnental variables.
noo
YO
otr
aO
What are internal and external commands in UNIX? Explain any three with examples in
each
b.
c.
a=
files.
[NIX.
(07 Marks)
(07 Marks)
(06 Marks)
(08 Marks)
(06 Marks)
(06 Marks)
oc)
boc
4a.
b.
,6
-c(B
c.
-?o
or=
List and explain the different ways of setting directory permissions.
Explain the following filters,with examples :
i) head ii) tail iii) cut iv) paste.
Explain hardlink and symbolic link, with examples.
(07 Marks)
(07 Marks)
(06 Marks)
PART _ B
o.L
tr9.
o."
oj
C6?ifqit!{*
a.
b.
c.
c.
a=
A,i,
Explain the grep, egrep and fgrep, with examples.
Explain Sed command with all options.
Describe the salient features of LINIX operating system.
Explain the special parameters used by the shell programming.
, (07 Marks)
Write an shell script that accepts two file names as arguments, check if the permissions of
these files are common permission or different permission.
(0T lVlarks)
Explain the following : i) expr ii) shift iii) set iv) read.
(06 Marks)
Ll&i{$::$jt
.:::
(07 Marks)
(07 Marks)
(06 Marks)
!o
5.v
>,h
ibo
o=
so
tr>
:o
;L
lr<
:a_)
o
Z
o
la.
b.
c.
8a.
b.
c.
What is awk? List and explain any three built - in functions in awk.
Write an awk program to print transpose of a given matrix.
Explain with examples, the simple awk filtering.
Explain briefly the features offered by PERL.
Explain chop( ) and split( ) with examples.
Write a PERL program to conveft an unsigned binary to decimal.
(06 Marks)
(07 Marks)
(07 Marks)
(07 Marks)
(07 Marks)
(06 Marks)