How To Exam?

a knowledge trading engine...


Saurastra University 2006 M.Sc Computer Science Statistics (Computer Programming C & C++) - Question Paper

Wednesday, 17 April 2013 07:25Web


M. Sc. exam
April / May – 2006
Statistics
(Computer Programming C & C++)
Time : three Hours] [Total Marks : 100
Instructions : (i) Attempt any 5 ques..
(ii) every ques. carries equal marks.
1 give short ans with illustration wherever necessary : 20
(i) If array1 and array2 are dimensioned as char array1[10],
array2 [20]; and array1 has been intialized, what is the
effect of statement array2 = arra1; ?
(ii) How is integer array declared in C, containing 100
elements ?
(iii) Is it possible to initialize and declare an array
simultaneously, how ?
(iv) What is difference ranging from user-defined function and
library function ?
(v) Name 2 common functions supplied in the C standard
library.
(vi) How many values a function can return ? Why ?
(vii) What is the difference ranging from a function Call written
as a STATEMENT and 1 written as a PART OF
EXPRESSION on RHs of assignment statement ?
(viii) What is difference ranging from 2 operators = and = = ?
(ix) What is meant by ‘PASSING BY REFERENCE’ ?
(x) The keyward default is a part of which statement ? provide
details.
2 Write a program segment, any 3 : 20
(i) Write a function ‘abs’ which returns the absolute value
of an integer that is passed as a parameter.
(ii) Write a function ‘min’ which returns the smaller of its
two parameters. Can you obtain max. of 2 parameters
using this funciton ? provide cause.
ST–2434] two [ Contd....
(iii) That uses rand ( ).
(iv) Which uses SWITH statement to convert
0® 5, 2® 6, 3® 9, 4® seven in a 2 digit number.
(v) Write a function which prints a m×n matrix of integers.
Use it to print matrix A (10,5).
3 (a) obtain what is the value ? 10
(i) if b5  19  30 2g four   c15  b64ghg % sqrt
(ii) toupper (aBCD)
(iii) strlen (Department of Statistics)
(iv) for int i  1, i;   100; i   T  i; b gl q cout 10
<<“T=”<(b) Translate the algorithm into C/C++ language program :
(i) describe f x x bg= expe- j 2
(ii) Enter limits of the integral and number of divisions
a, b, n
(iii) compute i = bb - agn
(iv) compute j  i 2
(v) Integral = 0
(vi) compute half = f (a+j)
(vii) compute integral = S fba + ikg for k = 1,2, . .. ,n - 1
(viii) Integral = i six * cfbag+ four * half + two * + fbbgh integral
(ix) Print value of integral with suitable comment.
4 (a) define with examples : 10
(i) keywords
(ii) constant
(iii) arithmetic operators
(iv) header files
(v) printf
(b) List all the comparison and logical operator giving 10
their meaning. provide examples on any 4 of them.
5 Write computer programmes in C++ for any 2 of the 20
subsequent :
(i) Transpose of a matrix A of dimension m×n
(ii) calculation of mean, median and standard deviation
for a provided frequency distribution.
ST–2434] three [ 100 ]
(iii) To test H0 : m = m 0 against H1 0 : m > m for both s known
and s unknown cases using random sample of size n
from N m, se 2j.
6 (i) Write a C program to calculate correlation coefficient 20
ranging from X and Y.
(ii) define the 3 conditional statements commonly
used in c programming. Also provide a computer programme
segment which uses all these conditional statements.
(iii) What is while loop ? How does it vary from the for loop ?
Write a computer programme segment using for loop
and rewrite the identical using while loop.
7 (i) discuss the syntax of declaring a function. 20
(ii) What is meant by call by reference and call by value ?
(iii) What is a recursive function ? Write a computer program
to calculate
n
r F
HG
IKJ using a recursive function to calculate
K ! K = 1, 2. .. .n.
8 (i) discuss do while loop with help of an illustration. 20
(ii) Write a C program to test the significance difference
ranging from 2 sample means.
9 (a) What do you mean by nested loop ? Write a 20
programme segment to (i) learn a 3 dimensional
array (ii) sum values over range of 3rd index variable
and print them appropriately.
(b) Write a programme to calculate the product of two
matrices A of m×n and B of N×P.
10 (a) What do you mean by (i) Pointers (ii) Objects 10
(iii) Classes (iv) Functions in C/C++ language ?
(b) Write a C++ programme to organize an array of 100 10
elements in ascending order.


( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Saurastra University 2006 M.Sc Computer Science Statistics (Computer Programming C & C++) - Question Paper