Total No.
of printed pages : 3
3 (Sem 6) MTH M3
2015
MATHEMATICS
(Major)
Theory Paper : M-6.3
(Computer Programming in C)
Full Marks - 40
Time - TWo hours
The figures in the margin indicate full marks
for the questions.
1. Answer any six questions : I x6:6
(a) Give one example each of 'main memory' and
'secondary memory'.
(b) What is meant by 'machine level language,?
(c) Mention the utility of a 'compiler'.
(d) What is the role of an 'assembler' ?
(e) What is a 'flowchart' ?
(f) What is an ASCII code ?
(g) Name any two application software packages.
tTum over
2. Answer arty two questions : 2x2:4 4. Answer any two questions : 5 x2:10
(a) What is a 'string constant'? Explain briefly (a) Write a program in C to find the sum of two
with examples. 3x3 given matrices.
(b) What is meant by hierarchy of opertation ? (b) What is a 'pointer' ? Explain its role with the
Mention the operator precedence for arith- help of a suitable example.
metic operators.
(c) Explain the utility of 'break' and 'continue'
(c) Discuss the difference between assignment statement with the help of suitable examples.
and equality. (No need to write the full program. Just write
the segments where you use the statements).
3. Answer any two questions : 5x2:10
5. Answer any two questions : 5x2:10
(a) Give the general form of if-else' statement
in C and explain how it works with the help
(a) What is a user defined function ? Why is it
of a suitable example. used ? How are such functions declared and
called in a C program ? Explain with the help
of a suitable example.
(b) Using 'switch' statement write a C program
to find the value of y using (b) Write a recursive function to display the first
50 terms of the fibonacci series :
I+x. whenn:1
0, 1, 1, 2, 3, 5, g, 13,.....
l+ " when n:2
Y
y(x, n): n
Also write the main program.
l+xn when n: 3
(c) Explain briefly what is meant by 'call by
l+nx whenn>3orn<1 value' and 'call by reference' of a function.
(c) Using 'for loop' write a program in C to sort
a set of 50 given numbers in ascending order.
4ll3(Sem 6) MTH M3 (2) 4113(Sem 6) MTH M3 (3) 4000