PABSON , Kathmandu
2079-09-08 07.30am
SEE Pre-Qualifying Exam 2079 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) Write two examples of bounded media. b) Write two methods for hardware security. c) What is M-Commerce? d) List two examples of DBMS. e) What is modular programming in Q-Basic programming? f) What is C language? Q2. Write appropriate technical terms for the following: [2×1=2] a) The fake attempt to obtain sensitive information such as username, password by disguising oneself as a trustworthy entity. b) The technology to encode file or message. Q3. Write the full forms of the following: [2×1=2] (a) URL (b) ADSL Group ‘B’ Short Answer : [12×2=24] Q4. Write the following questions. [9×2=18] a) "Computer network reduces the operation cost." Justify this statement. b) What is computer security Write two measures to protect it. c) What is e-governance? Write any two advanatges of it. d) How does IoT help in our daily life? Explain. f) List any four data types of MS-Access. Also mention its function. g) Define field and record in database. h) What is the primary key? Write its importance. i) What is the query in MS-Access? List different types of query in MS-Access. Q5. Write the output of the given program. Show with dry run in table. [2] DECLARE SUB series() CLS CALL series END SUB series() A = 11111 C = 5 WHILE C>=1 PRINT A; A = A \ 10 C = C - 1 WEND END SUB
Answer:
Corrected Program:
REM to store name,address in the file "store.dat"
OPEN "store.dat" FOR OUTPUT AS #1
DO
INPUT "Enter name"; name$
INPUT "Enter address"; address$
WRITE #1, name$, address$
INPUT "do you want to continue"; ans$
LOOP WHILE UCASE$(ans$)="Y"
CLOSE #1
END
Q7. Study the following program and answer the given questions. [2×1=2] DECLARE SUB string(x$) CLS X$ = "COMPUTER" CALL string(X$) END SUB string(x$) L = LEN(X$) FOR A= L to 1 step -2 PRINT MID$(x$,A,1) NEXT A END SUB Questions: a) What is the value of L in the above program? b) List the numeric and string variable in the above program.
Group "C" Long Answer Questions: [4×4=16] Q8. Convert / calculate as per the instruction: [4×1=4] (a) (CAB)16into Binary (b) (767)8 into Decimal (c) (11110111)2 + (1011)2 - (11)2 (d) (10111101)2 ÷ (101)2 Q9. Write a program in QBASIC to calculate total surface area of a cylinder using function procedure and volume using sub procedure. [Area=Total surface area=2ℼr(r+h) and volume=ℼr2h] [4]
SEE Pre-Qualifying Exam 2079 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) Write two examples of bounded media. b) Write two methods for hardware security. c) What is M-Commerce? d) List two examples of DBMS. e) What is modular programming in Q-Basic programming? f) What is C language? Q2. Write appropriate technical terms for the following: [2×1=2] a) The fake attempt to obtain sensitive information such as username, password by disguising oneself as a trustworthy entity. b) The technology to encode file or message. Q3. Write the full forms of the following: [2×1=2] (a) URL (b) ADSL Group ‘B’ Short Answer : [12×2=24] Q4. Write the following questions. [9×2=18] a) "Computer network reduces the operation cost." Justify this statement. b) What is computer security Write two measures to protect it. c) What is e-governance? Write any two advanatges of it. d) How does IoT help in our daily life? Explain. f) List any four data types of MS-Access. Also mention its function. g) Define field and record in database. h) What is the primary key? Write its importance. i) What is the query in MS-Access? List different types of query in MS-Access. Q5. Write the output of the given program. Show with dry run in table. [2] DECLARE SUB series() CLS CALL series END SUB series() A = 11111 C = 5 WHILE C>=1 PRINT A; A = A \ 10 C = C - 1 WEND END SUB
Dry Run:
Q6. Re-Write the given program after correcting the bugs. [2]
REM to store name,address in the file "store.dat"
OPEN "store.dat" FOR INPUT AS #1
DO
INPUT "Enter name"; name$
INPUT "Enter address"; address
WRITE name$, address$
INPUT "do you want to continue"; ans$
LOOP WHILE UCASE$(ans$)="Y"
CLOSE #2
ENDAnswer:
Bugs | Correction |
---|---|
INPUT | OUTPUT |
INPUT "Enter address"; address | INPUT "Enter address"; address$ |
WRITE name$, address$ | WRITE#1, name$, address$ |
CLOSE #2 | CLOSE #1 |
Q7. Study the following program and answer the given questions. [2×1=2] DECLARE SUB string(x$) CLS X$ = "COMPUTER" CALL string(X$) END SUB string(x$) L = LEN(X$) FOR A= L to 1 step -2 PRINT MID$(x$,A,1) NEXT A END SUB Questions: a) What is the value of L in the above program? b) List the numeric and string variable in the above program.
Group "C" Long Answer Questions: [4×4=16] Q8. Convert / calculate as per the instruction: [4×1=4] (a) (CAB)16into Binary (b) (767)8 into Decimal (c) (11110111)2 + (1011)2 - (11)2 (d) (10111101)2 ÷ (101)2 Q9. Write a program in QBASIC to calculate total surface area of a cylinder using function procedure and volume using sub procedure. [Area=Total surface area=2ℼr(r+h) and volume=ℼr2h] [4]
DECLARE F
Q10. A sequential data file "employee.dat" contains name,address, age and salary of employees. Write a QBASIC program to display all the information whosse address is 'Kathmandu' and salary is greater than 50000. [4]
plk
Q11. Write a program in C language to find the reverse of an input number. [4]
#include<stdio.h>
int main()
{
int num,r,s=0;
printf("Enter any number ");
scanf("%d",&num);
while(num!=0)
{
r=num%10;
s=s*10+r;
num=num/10;
}
printf("Reverse number = %d",s);
return 0;
}
OR
Write a program in ‘C’ language to input a number and check whether the input number is positive, negative or zero. [4]
#include<stdio.h>
int main()
{
int num;
printf("Enter any number ");
scanf("%d",&num);
if(num>0)
printf("Positive number");
else if(num<0)
printf("Negative number");
else
printf("Zero");
return 0;
}
The End