Group ‘A'
Very Short Answer [10x1=10]
1. Answer the following questions in one sentence:
[6x1=6]a. What is an email?
a. The amount of data transferred in a given medium.
a. POP
Group ‘B'
Short Answer [12x2=24]
a. Write any two advantages of bus topology.
DECLARE SUB Display (T$)
CLS
T$ = "COMPUTER SCIENCE"
CALL Display (T$)
END
SUB Display (T$)
FOR C = 1 TO LEN (T$) STEP 2
$ = MID$ (T$, C, 1)
PRINT D$;
NEXT C
END SUB
6. Re-write the given program after correcting the bugs: [2]
REM TO find the factorial of a given number.
DECLARE FUNCTION FACTO (N$)
CLS
INPUT "Enter a number"; X
PRINT "The Factorial is: "; FACTO (N)
END
FUNCTION FACTO (N)
F = 1
WHILE N = 0
F = F*N
N = N - 1
WEND
F = FACTO
END FUNCTION
7. Study the following program and answer the given questions: [2]
DECLARE FUNCTION SUM (N)
CLS
INPUT "Enter any number"; N
S= SUM (N)
PRINT "The Sum of individual digit is:"; S
END
FUNCTION SUM (N)
WHILE N > 0 R = N MOD 10
S= T + R
N = N\10
WEND
SUM = T
END FUNCTION
a. State the purpose of using variable S in line 4 in the above program.
b. Write the use of MOD in the above program.
Group ‘C' Long Answer [4x4=16]
a. (1110001110)2 = (?)16
10. A data file “STAFF.dat” has stored records of few employees with EMPID, First name, last name, post, and salary. Write a program to display all the records of the employees whose salary is more than 40,000. [4]
11. Write a program in C language to input length in meter and display the length in centimeter. [4]
OR
Write a program in ‘C' language to input two numbers and find
greatest among two numbers.
Comments
Post a Comment