Roll No. ....,...... .
Total Pages : 03
PMMC/M-17 L0074
PROBLEM SOLVTNG TF{ROUGH C
CS-DE.12
Time : Three Hoursl [Maximum Marks : 80
Note : Attempt Five qu.estions in all, selecting at least o'?e
question from each Unit' Q' No l is compulsory' All
questions carry equal marks'
1. (i) What is the difference between 4Ssembler an{ '
iflterPreter ?
(iD What is the difference between prefix and post frx
++ operators ?
(iii) Write the recursive frrnction to compute factorial'
(iv) Discuss the strcmp( ) library function'
i
Unit I
1 (a) What is flow chart ? Vhat are the different symbols {
used in it ? Draw the'flow chart to flrnd whether the
given ilPut I
(b) What is Algorithm ? What are its characteristic
features ? Write the algorithm to compute the
factorial of a given number in the range 1 to N'
(2i7l8) L-1007.1 P.T.O.
3 (a) What is structured progamming ? What are its
(b) Differentiate between break
,rnd continue statement
ditrererrt rules ? ExPlain. using suitable examples.
(b) What is Compiler ? What are the different stages in
.,
comPilation ? Discuss' (a) what do you underst2nd by
scope .,-,f a variable ?
Differentiate betw.een
register storage
Unit II classes w.r.t. scope
Jl[,#"
(a) What do you understand by associative of O) What is an an-ay ? Write
a function in C to perform
4
binary search. The argurnent
operators ? Hoqr is it different from precedence of of the firnction should
be an array of integer and
operators ? Discuss' the number trr be searched.
(b) What is the tcmary operator in C language ? Write
Unit IV
a progr n in C to find the largest of two numbers
using ternarl' oPeratur'
8. (a) What is Structure ? What is
the difference be&veen
structure and rrni6n ? Explain.
t. (a) What do you urderstand b1. function ? -,Vrite a (b) What is String ? Write your
own fi:ncticn to copy
flmction in C to retum the absoh:te valrrc of a a srring just like strcpy( library
given integer'
) firnction.
(b) What are the <lifferent data t pes available in C ?
9. (a) \lhat is pointer ? Write a function in C to swap the
Discuss in brief the enurnerated data types. values of rwo given integer
rrguments.
(b) What is dynamic.memory
allocation ? Explain.
Unit III
6. (a) What is the difference between while and do-while
loop ? Write a program in C to generate first
N(nahral numt€rs suing while loop as well as do-
while looP'
)
L10074 (i47te) L_70074
3
600