Skip to content
Visva-Bharati · Department of Mathematics

DSEMA-3A

B.Sc. Mathematics · Semester VI2022
  1. 1(a) Given a set of 100 positive integers, design a flowchart (using standard symbols) to evaluate \par (i) the total number of odd integers. \par (ii) the sum of all odd integers. [4]
  2. 1(b) Write the full form of EBCDIC. [1]
  3. 2(a) Name different types of variables with appropriate examples which are recognised by FORTRAN 77. [2]
  4. 2(b) Given the following declaration statement \begin{verbatim} CHARACTER*10 P, Q*5, R*5, C*1, S1*3, S2*5 \end{verbatim} where the variables S1 and S2 hold the values ‘FOR’ and ‘TRAIL’ respectively. Examine if the following statements are valid. Find the values assigned to the variables P, Q and R in the following assignment statements, if valid. \begin{verbatim} (i) P=S2 // 'ING' (ii) Q=S1 // S2( : 1) (iii) R='ONE' //22 \end{verbatim} [3]
  5. 3(a) Write down the FORTRAN expression of the following mathematical expression: \[\cos\left(\frac{(a^2+5d-\log d)}{\tan(b^2-c^2)\operatorname{cosec}(x+c)}\right) +\frac{1}{\sqrt{2\pi k}}e^{-\frac{(x-r)^2}{2k^2}}\] [1.5]
  6. 3(b) State two main differences between STOP statement and END statement. [2]
  7. 3(c) Write a set of logical IF statements which are equivalent to: \begin{verbatim} GO TO(47, 33, 55, 77), K \end{verbatim} [1.5]
  8. 4(a) Write a FORTRAN 77 program which reads the elements of a square matrix $M$ of order $n(\le5)$ and check whether it is symmetric or not. [3]
  9. 4(b) Find the label of the statement to which control is transferred for each of the following FORTRAN 77 segments. \begin{verbatim} (i) J=2 J=J+2 GO TO(23, 47, 16, 94), J (ii) INTEGER ROLL K=2 ROLL=2*K GO TO(51, 61, 71, 81), ROLL \end{verbatim} [1+1]
  10. 5(a) Find the output (mentioning all the necessary steps involved) of the following program: \begin{verbatim} INTEGER A(10) DO 100 I=1, 10, 2 A(I) = 2*I-3 A(I+1) = I**2-5 100 CONTINUE DO 200 I=2, 10, 3 A(I) = A(I+2)-A(I) 200 CONTINUE WRITE (6, 10) A 10 FORMAT(1X, 5I8) STOP END \end{verbatim} [3]
  11. 5(b) If LG=.FALSE., I=2, J=3, K=4 and L=5, find the value of the following expression by indicating the order of the evaluation: \begin{verbatim} (LG .OR. K .NE. J) .AND. .NOT. (I * J .LT. L ** 2) \end{verbatim} [2]
  12. 6(a) Find errors, if any, in each of the following subprogram defining statements: \begin{verbatim} (i) SUBROUTINE NEW(X, Y(3), Z) (ii) FUNCTION ADD(X, Y, Z) Z=X+Y RETURN END \end{verbatim} [1+1]
  13. 6(b) Define a statement function to calculate $R=\sqrt{u^2+v^2+w^2}$ and write assignment statements to calculate $A=\frac{x}{\sqrt{x^2+y^2+z^2}}$, $B=\sqrt{x^4+y^4+z^4}$, $C=\sqrt{4x^2+9y^2+4z^2}$. [2]
  14. 6(c) Why is a subprogram called a complete program? [1]