QP 32177903
QP 32177903
QP 32177903
Semester :V
Duration : 3 hours
Maximum Marks : 75
b. Write a program in BASIC to read, print and carry out the transpose of following
matrix
3 4 5
|6 7 8|
1 7 9
Note that the printing is to be done along with vertical line whose ASCII value
in decimal is 179.
(10,10)
3.
a. Identify the errors in the following program. Write the correct program.
20 CLS: SCREEN ‘640*480
25 LOCATE (5,25): PRINT IDEAL GAS ISOTHERMS
30 VIEW (-100,100) - (500,400) ,,7
40 FOR T=200 TO 500 STEP 20
50 FOR V= 0.05 TO 0.5 STEP .0001
60 P=0.0821 *T/V
65 PSET V,P
70 NEXT T
80 END
b. Identify which of the following statements, if any are written incorrectlyand write
their correct form
i. ON N$ GOTO 10, 20, 30
ii. IF X^2 < 0 THEN 20
iii. FOR I = 10 TO 0 STEP 2
iv. IF X < A+B THEN 55 ELSE 72
v. FOR K$= 1 TO L STEP2
vi. DEF FN(X)= X^4 – Z^3
d. Identify the errors in the following Basic Numbers. Also write the correctform for
the incorrect one.
i. 7,102
ii. 4.63E – 0.8
iii. + - 4251
iv. 2.6E + 2
v. Rs123
vi. 6.91
vii. -6.8 × 10-5
viii. 456V3
(4,4,8,4)
5.
a. Differentiate between relational and logical operators.
Let X=1 and Y=2. Determine whether the following relational expressions is true
or false
i. 2*X+Y^2 > Y+3
ii. X > Y OR X > 0 AND Y < 0
∆𝐻 = ∫ (𝐴 + 𝐵𝑇 + 𝐶𝑇 2 )𝑑𝑇
𝑇1
c. Using sorting, write a program in BASIC to arrange the following student’s names
in alphabetical order along with their CGPA
Student Name CGPA
KESHAV 7.5
AMITA 8.8
MEGHA 6.4
DHRUV 8.5
TEENA 7.0
What will be the change required in the program in order to sort the resultin
ascending order of CGPA?
(10,5,5)
6.
a. Write a program in BASIC to find the change in enthalpy (H) of SO2 when the
temperature changes from 300 K to 1100 K using trapezoidal rule and the
following data
T/K 300 500 700 900 1100
Given that
𝑇2
∫ 𝑑𝐻 = ∫ 𝐶𝑝 𝑑𝑇
𝑇1
What will be the output of above program? Report the value of H.