LOYOLA COLLEGE (AUTONOMOUS), CHENNAI – 600 034
U.G. DEGREE EXAMINATION
FOURTH SEMESTER – APRIL 2006
S 431 – BASIC
Date & Time : 27-04-2006/9.00-12.00 Dept. No. Max. : 100 Marks
Answer ALL questions [10´2 =20]
- Define a Compiler and give an example
- Draw a flowchart to find the area of a rectangle
- Write the importance of STOP statement
- Convert the following binary number to decimal : 100001
- Convert the following decimal to binary number : 110000
- Define an array and give an example
- Give the output of the following program:
10 LET A= 2
20 LET A = A*5/2
30 PRINT A
- State the purpose of control statements.
- What is the use of LEN( ) function?
- Define a RECORD
Answer any FIVE questions [5´8 =40]
- Distinguish between GOTO and ON… GOTO statements.
- Write a program to find the Compound interest.
- Write a program to find sum of n numbers.
- Explain a] READ…DATA b] INPUT statements
- Write a BASIC program to print first 10 multiplication tables.
- Explain the different types of expressions.
- What are string handling functions? Why do we need such functions? Explain.
- Why do weed data files? Explain, how we could organize them in BASIC.
Answer any TWO questions [2 ´ 20 =40]
- a] Write a BASIC program which arranges n-given numbers in ascending order.
b] Explain any five built-in-functions with at least an example.
- Explain the following control statements with appropriate syntax and suitable examples: i] IF ii] FOR
- Write a program to read the values of matrices viz. Amxn and B mxn . Compute the sum of the matrices A and B and store the results in the matrix Cmxn.
- Write a program to create a data file by name “SCORES.DAT to store the following data for each record :DEPTNO, SUB1,SUB2,SUB3. Also, write another program which reads SUB1,SUB2,SUB3 from the data file SCORES.DAT and hence compute AVERAGE for each student. Finally print DEPTNO and AVERAGE.