Statistical Computing: Ustng C/ C++ Programming
Statistical Computing: Ustng C/ C++ Programming
3(Sem-5/CBCS)STA HC 2
2022
STATISTICS
(Honours )
Paper : STA-HC-5026
( Statistical Computing
ustng C/C++ Programming)
Full Marks : 60
Time : Three hours
Contd.
(Sem-5/CBCS) 3
(r (g) ) (e) (d) (c)
expression. theif t Use To (iv) (ui) = (i!= Which?
) operator they All What comma (w) (i) colon(i)
semicolon Every
with
end a
STA 1s print
an None % variables dot
HC are is
2/G error
the of
a
programme
of the used
data scanf
2 to (Choose
in the following must (Choose
place
the left in
(State above (State the function
field
justiied,
a(Fill the
be statement
programnme.
isinitialized the
semicolon
True anTrue
specification. in correct correct
?
the assignment
or we or in
False) afterblank) mustoption) False) before option)
must C
3 2.
m-5/CBCS)
(c) (b) Answer:
(a)briefly () (k) i) (i)
in Define write
Write
available declared
illegal. Theprogramme.
the An (i) program
(i) ?be What
Which
(iv) goto(üi)
STA
any following used
printf(%d",
declaration N[3); array Both break exit()
HC
down global about of is
2/G four tothe an
and ()
N[3]={1,
What (Choose and immediately algorithm
C.
variable CPU. following
3 the of statement
the initialized
relational (State int will (i)
following
and x be 2, the statements
?
(2]={1, ? 3} exit
True the correct
local
has
operators questions or 2, output in from
variable. option)
2x4=8 False) 3}; beena
Contd. the can
is of C
3
m-5/CBCS) 3.
Explain
the(a) Answer
following : (h) (g) (e) (d)
statement Briefly assuming
(i) Evaluate
(i) character
readingWhat () Write afterWhat
expressions
(ii)expressions
STA Consider
any
HC k=2*3/4
describe
k= are X+y -9x+4
+
z 3x execution wil mt+;y=m=
down
8;
2/G 3/2 C+d
with three that the a
in the the
be
+4 character C
functions ofthe
4
the the +following
+
programming
k the ofthe following
IF...ELSE'
nestedquestions 3/8 is equivalent the
help simple 4/4 a arithmetic given values
+ float and you
of 8-2
IF expressions of
statements:
a variable will statements C
flowchart. statement. +5/8
from writing
? m
5x3=15 use and
the : for
a ? y
3
m-5/CBCS)
(h) (g) (e) (d) ) (c) (b)
m-5/CBCS) 3
(e) )
(üi) briefly
Write(ü) (ü) if if if
(i) (iii)
STA x>5,000/- 3,000 x<
%S
%f getchar constants.
Distinguish
pairs #include Why
characterdirective ? findWriteDefine What Write
characters.
Trigraph 3,000/- then Let
following A
printing
HC
reading
/-Sx<5,000/-- shopping
x
2/G and the be
and and a isdown - the
%e and median
programme keyword -print nodiscount
7
%C when total
the mall
specifications scanfbetween x-Rs.
discount
specifications of algorithm. bill
On do n in print scheme is
functions of
observations.
we in C? 150/ offering
a
the
backslash customer,
C/C++ x-Rs.
following
2+2+2=6 use :
Contd. for
the 50/ the
for 2 2 7 to 2 1 4
(g) () Explain different data types
available in C. 5
(i) Write a programme in C/C+t+ to
read the values of x and y and
print the results of the following
expressions in one line
X +y X+y
X-y 2 and (x +y) (x-y)
5
(h) () Write a note on reading strings
from terminal and writing
to screen. strings
1%+1=3
(i) Write a program in C/C++ to
multiply matrix A of order m x n
with matrix B of order n x l
store the result in a matrix and
Cof
order m x l.
7
HC 2/G 8
3(Sem-5/CBCS) STA 800
Total number of printed pages-7
3 (Sem-5/CBCS) STA HC 2
2021
(Held in 2022)
STATISTICs
(Honours)
Paper : STA-HC-5026
( Statistical Computing using C/C++
Programming )
Full Marks : 60
(a) Draw a flowchart for calculating mean (e) Write a C/C++ program to determine
deviation from mean. the transpose of an n x n matrix A.
(a) ) What are different relational (üi) Write a C/C++ programme to find
the variance and coefficient of
operators available in C? 2
variation of n observations. 6
(ü) State the precedence rule of
2 (b) () Write an explanatory note on for'
arithmetic operators.
loop. 3
(üi) Write a C/C++ programme to find
the correlation coefficient of n pairs (i) Write a C/C++ programme to find
of observations. 6
an approximate solution of