(X) SEE Pre-Qualifying Exam 2078

PABSON , Kathmandu SEE Pre-Qualifying Exam 2078 Subject: Opt. II Computer Science Full Marks:50 Time: 1:30 hrs. Group ‘A’ Very Short Answer: [10×1] Q1. Answer the following questions in one sentence: [6*1=6] (a) What is internet? (b) What is cloud computing? (c) Which data type is used to store salary of an employee in MS Access? (d) What is an extension of MS Access database? (e) What are modules in QBASIC? (f) Write any two data type used in C language? Q2. Write appropriate technical terms for the following: [2×1=2] (a) The rate at which data are transferred in a given medium (b) The use of computer technology to create a simulated environment Q3. Write the full forms of the following: [2×1=2] (a) SMTP (b) CDMA Group ‘B’ Short Answer : [12×2=24] Q4. Write the following questions. [9×2=18] (a) Differentiate between bus and star topology with figure. (b) What is computer crime? Give any four examples of it. (c) What is hardware security? Write any two measures of software security. (d) What is e-commerce? Write its importance. (e) What is mobile computing? Write any two importance of it. (f) Differentiate between database and DBMS with example. (g) What is primary key? List any two advantages of it. (h) What is data sorting? List any two advantages of using it. (i) Define query? Write its importance. Q5. Write the output of the given program. Show with dry run in table. [2] DECLARE SUB SHOW (A,B) CLS X=1:Y=2 CALL SHOW (X,Y) END SUB SHOW (A,B) I = 1 DO PRINT A; A = A + B B = A + B I = I + 1 LOOP WHILE I<=5 END SUB
Dry Run:
I Output
Print A;
A=A+B B=A+B I=I+1 IS I<=5?
1 1 A=1+2=3 B=3+2=5 I=1+1=2 True
2 3 A=3+5=8 B=8+5=13 I=2+1=3 True
3 8 A=8+13=21 B=21+13=34 I=3+1=4 True
4 21 A=21+34=55 B=55+34=94 I=4+1=5 True
5 55 A=55+94=149 B=149+94=243 I=5+1=6 False
∴ Final Output is: 1 3 8 21 55
Q6. Re-Write the given program after correcting the bugs. [2] REM to store record in data file CLS OPEN "info.dat" FOR INPUT AS #1 DO INPUT “Enter Name, Address and Class ”;N$,A,C INPUT #1,N$,A,C INPUT "Do you want to continue " ; Y$ WHILE UCASE$(Y$)= "Y" CLOSE "info.dat" END
BugsCorrection
OPEN "info.dat" FOR INPUT AS #1 OPEN "info.dat" FOR OUTPUT AS #1
INPUT “Enter Name, Address and Class ”;N$,A,C INPUT “Enter Name, Address and Class ”;N$,A$,C
INPUT #1,N$,A,C WRITE #1,N$,A,C
WHILE UCASE$(Y$)= "Y" LOOP WHILE UCASE$(Y$)= "Y"
CLOSE "info.dat" CLOSE #1
After correction the correct program is : REM to store record in data file CLS OPEN "info.dat" FOR OUTPUT AS #1 DO INPUT “Enter Name, Address and Class ”;N$,A$,C INPUT #1,N$,A$,C INPUT "Do you want to continue " ; Y$ LOOP WHILE UCASE$(Y$)= "Y" CLOSE #1 END
Q7. Study the following program and answer the given questions. [2×1=2] DECLARE FUNCTION test$(N$) CLS INPUT "Enter any string "; X$ PRINT test$(X$) END FUNCTION test$(N$) FOR I = LEN(N$) TO 1 STEP-1 W$=W$+MID$(N$,I,1) NEXT I test$=W$ END FUNCTION (a) What is the main objective of the program given above? Answer: The above program will display the given string in reverse order. (b) List all the parameters used in above program. Answer: Formal parameter is : N$ Real | Actual parameter is : X$ Group "C" Long Answer Questions: [4×4=16] Q8. Convert / calculate as per the instruction: [4×1=4] (a) (1110001110)2 = (?)8 (b) (111)10=(?)2 (c) (1000)2 - (111)2 =(?)2 (d) (111111)2 ÷ (111)2 Q9. Write a program in QBASIC to input radius of circle and calculate its area using function and circumference using sub procedure. [Area=pie×r2 and Circumference=2pier] [4]
DECLARE FUNCTION AREA(R) DECLARE SUB CIRCUM(R) INPUT "ENTER RADIUS:";R CALL CIRCUM(R) PRINT "AREA IS "; AREA(R) END SUB CIRCUM(R) C = 2 * 3.14 * R PRINT "CIRUCUMFERENCE IS";C END SUB FUNCTION AREA(R) AREA = 3.14 * R * R END FUNCTION
Q10. A sequential data file called "Record.txt" has stored data under the field heading Roll No., Name, Gender, English, Nepali and Math’s and Computer. Write a program to display all the information of female students who pass in all subjects. [Note: Pass nark in all subjects is 40].[4]
plk
Q11. Write a program in C language to convert days into respective years, months and days. [4]
plk
OR Write a program in ‘C’ language to input two numbers and find greatest among two number. [4]
plk
The End