Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Total No.

of Printed Pages : 4 ] OBE

041842

B. A./B. Sc. (Hons) Semester V Open Book Examination 2 0 2 1 – 2 2

MATHEMATICS
Paper No. MTB-503 : Programming in ‘C’
Time : 4 hours 30 minutes Full Marks : 50

Instructions :

(i) The Question Paper contains 08 questions out of which you are required to
answer any 04 questions. The question paper is of 50 Marks with each
question carrying 12·5 Marks.
àíZnÌ _| 8 àíZ ny±N>o J`o h¢ {OZ_| go 4 àíZm| H$m CÎma XoZm h¡& àíZnÌ 50 A§H$m| H$m
h¡, {Og_| àË`oH$ àíZ 12·5 A§H$ H$m h¡&
(ii) The total duration of the examination will be 4·30 Hours (Four Hours and
Thirty Minutes), which includes the time for downloading the question
paper from the portal, writing the answers by hand and uploading the
hand-written answer sheets on the portal.
narjm H$m Hw$b g_` 4·30 K§Q>o H$m h¡ {Og_| àíZnÌ H$mo nmoQ>b
© go S>mCZbmoS> H$aHo$ nwZ…
àíZm| H$m hñV{b{IV CÎma nmoQ>©b na AnbmoS> H$aZm h¡&
(iii) For the students with benchmark disability as per Persons with Disability
Act, the total duration of examination shall be 6 Hours (Six Hours) to
complete the examination process, which includes the time for downloading
the question paper from the portal, writing the answers by hand and
uploading the hand-written answer sheets on the portal.
{Xã`m§J N>mÌm| Ho$ {b`o narjm H$m g_` 6 K§Q>o {ZYm©[aV h¡ {Og_| àíZnÌ H$mo nmoQ>©b go
S>mCZbmoS> H$aZm Ed§ hñV{b{IV CÎma H$mo nmoQ>©b na AnbmoS> H$aZm h¡&
(iv) Answers should be hand-written on plain white A4 size paper using black or
blue pen. Each question can be answered in up to 350 words on 3 (Three)
plain A4 size paper (only one side to be used).
àíZm| H$m hñV{b{IV CÎma gmXo g\o$X A4 gmBO Ho$ nÞo na H$mbo AWdm Zrbo H$b_ go
{bIm hmoZm Mm{h`o& àË`oH$ àíZ H$m CÎma 350 eãXm| VH$ VrZ gmXo n¥ð> A4 gmBO _| hmoZm
Mm{h`o& àíZm| Ho$ CÎma Ho$ {bE Ho$db EH$ Va\$ Ho$ n¥ð> H$m hr Cn`moJ {H$`m OmZm Mm{h`o&

D1(353) (Continued)
(2)

(v) Answers to each question should start from a fresh page. All pages are
required to be numbered. You should write your Course Name, Semester,
Examination Roll Number, Paper Code, Paper Title, Date and Time of
Examination on the first sheet used for answers.
àË`oH$ àíZ H$m CÎma Z`o n¥ð> go ewê$ H$aZm h¡& g^r n¥ð>m| H$mo n¥ð>m§{H$V H$aZm h¡& N>mÌ H$mo
àW_ n¥ð> na àíZnÌ H$m {df`, go_ño Q>a, narjm AZwH«$_m§H$, àíZnÌ H$moS>, àíZnÌ H$m
erf©H$, {XZm§H$ Ed§ g_` {bIZm h¡&

Q.1. (a) Who is the founder of the ‘C’ language? When was the ‘C’ language
developed? 1

(b) What is the use of printf( ) and scanf( ) functions? 1

(c) Discuss the difference between --a and a--. 1½

(d) What is the difference between the local variable and global variable
in ‘C’ ? 1½

(e) What is the purpose of atoi( ) function? Give an example. 1½

(f) Describe the difference between = and == operators in ‘C’ programming. 1½

(g) What is the use of the function in ‘C’ ? 1½

(h) What is pointer in ‘C’ ? What is the usage of the pointer in ‘C’ ? 1½

(i) What is ‘C’ Token? 1½

Q.2. (a) Write a program to swap two integer numbers without using the third
variable. 2½

(b) Write code-segment for an infinite loop by using for, while and do-while. 2

(c) Explain the syntax for switch-case statements with a ‘C’ program. 2

(d) Determine the hierarchy of operations and evaluate the following


expression : 2

6  2 / ( 2  1  2 / 3  6 )  8  ( 8 / 4)

(e) Write a program in ‘C’ to check the given number format is in binary or
not. 2

D1(353) (Continued)
(3)

(f) Write a code to have the following output in ‘C’ using nested for loop : 2
1
23
456
7 8 9 10
456
23
1

Q.3. (a) Write a general program in ‘C’ to evaluate and print series for
x2 x3 x4
1 x     , 0  x  1
22 33 44
with 0·01 percent accuracy. 4½
(b) Write a ‘C’ program to find all prime factors of a given integer. 4
(c) Write a ‘C’ program to check given integer is prime or not. 4

Q.4. (a) Write a general ‘C’ program to check whether a given string is
a palindrome or not. 4½
(b) Write a general program in ‘C’ to print the reverse of a given number. 4
(c) Write a program in ‘C’ to check a given number is perfect square or not. 4

Q.5. (a) Write a ‘C’ program that uses functions to perform the following
operations using structure : 4½
(i) Reading a complex number
(ii) Writing a complex number
(iii) Addition of two complex numbers
(iv) Multiplication of two complex numbers.
(b) Write a general program in ‘C’ to compute and print the sum of all
elements stored in an array using pointer. 4
(c) Write a program to print the second highest element of a matrix of order
m  n and also print its frequency in the matrix. 4

D1(353) (Continued)
(4)

Q.6. (a) Write a ‘C’ program to print the highest frequency character in a string. 6½
(b) Write a program to read data from the keyboard, write it to a file called
INPUT.txt, again read the same data from the INPUT.txt file and display
it on the screen. 6

Q.7. (a) What is recursive function in ‘C’ ? Write a program to print Fibonacci
series using recursion. 6½
(b) Write a program to print Fibonacci series without using recursion. 6

Q.8. Write the difference between call by value and call by reference in ‘C’.
Explain them with examples. 12½



D1(353) OBE 041842

You might also like