Click here for full SEE New syllabus Computer Science Notes.
Click here for C-Programming Notes
Click here to download SEE new model question of computer science.
Model question video solution with explanation Part A and Part B
Secondary Education Examination
Model Question Solution
Subject: Computer Science Time:1:30 hr. FM: 50
Group ‘A’ - 10 marks
1.Answer the following questions in one sentence: [6x1=6]
a. What is search engine?
Search engine is a web application which allows user to search the content from the internet based in their queries. E.g. Google, Bing
b. What is the business done through the internet?
E-Commerce is the business done through the internet
c. Which data type is used to store numeric characters or special symbols in MS-Access?
“Text” data type is used to store numeric characters or special symbols in MS-Access
d. Which view is used to modify a table in MS-Access?
Design view is used to modify a table in MS-Access.
e. What is Modular Programming?
The process of breaking down a large program into smaller logical and manageable part is called modular programming.
f. Write any two features of C language.
2. Write appropriate technical term for the following: [2x1 =2]
a. Law that governs the legal issues of cyberspace. [Cyber Law]
b. The smallest unit to represent information on quantum computer. [Quantum Bit]
3. Write the full form of the following: [2x1=2]
I. STP: Shielded Twisted Pair
II. WAP: Wireless Application Protocol
Group ‘B’ - 24 marks
4. Answer the following questions: [9x2=18]
a. What is computer network? Enlist any two advantages of it.
A group of computers interconnected with each other through any medium using definite rule(protocol) for the purpose of sharing data, information, hardware, software and other resources. The advantages are:
b. What is computer ethics? Write any two of them.
Computer ethics are the moral code of conduct or set of principles that guides computer user about the wise and safe use of computers and other electronic media. It generally aware computer user from misuse and exploitation of technology.
c. What is software security? Write any two measures of hardware security.
The protection or securing computer data, information and software from being damaged or lost accidentally or intentionally is known as software security.
The two measures of hardware security are:
d. What is m-Commerce? Write its two important services.
M-Commerce refers to Mobile-Commerce which is an extended version of E-Commerce where buying and selling goods, services and information are done through handheld devices like mobile phone, tablets, PDAs etc. E.g. movie tickets, flight ticket. The two important services are:
e. What is IoT? Write any two importance of it.
IoT (Internet if Things) is the network of real world “Things” (Devices) made with sensors, software, hardware and other various modern technology that can communicate with the user and devices along with its environment. E.g. smart watch, voice assistant, smart car. Its importance are:
f. What is database ? Give any two examples.
The systematic and scientific collection of data that can be retrieved or access whenever required is called database. It is the organized way of collecting and keeping data and information. E.g. Dictionary, Telephone directory, Marks ledger etc.
g. What is primary key? List any two advantages of it.
The key or field that is used to uniquely identify records from the database table is called primary key. It must be unique and cannot be kept empty(null value not accepted)
Its importance is:
h. What is data sorting? List any two advantages of using it.
Arranging data in a particular order of field that may be either ascending or descending is called data sorting. The process of placing elements from a collection in some kind of order is sorting. Its advantages are:
i. What types of work is done in MS-Access using Form and query object?
Form allows user to enter new data and edit or modify the existing data through user friendly interface.
Query allows user to retrieve or access and interpret the information based on the user requirements.
5. Write down the output of the given program. Show with dry run in table. [2]
DECLARE SUB SHOW (A)
CLS
N = 87
CALL SHOW (N)
END
SUB SHOW (A)
DO
B = A MOD 6 + 3
IF B MOD 4 = 0 THEN
GOTO AA
PRINT B;
AA:
A = A - 10
LOOP WHILE A >= 50
END SUB
Dry run in table | ||||
A | N | B = A MOD 6+3 | Condition(B MOD 4 = 0) | |
- | 87 | - | - | |
87 | 87 | - | - | |
1st loop | 77 | 87 | 6 | false |
2nd loop | 67 | 87 | 4 | true |
3rd loop | 57 | 87 | 6 | false |
4th loop | 47 | 87 | 8 | true |
Output is:
6 6
6. Re-write the given program after correcting the bugs: [2]
REM to add record in an existing file
CLS
OPEN “Record.Dat” FOR OUTPUT AS #1
AA:
INPUT “Enter Name, Class and Roll No. “; Nm$, Cl, Rn
INPUT #2, Nm$, Cl, Rn
INPUT “More records “; Y$
IF UCASE$(Y$) = “Y” THEN
GOTO aa
CLOSE “Record.dat”
END
Program after correcting bugs is:
CLS
OPEN “Record.Dat” FOR APPEND AS #1
AA:
INPUT “Enter Name, Class and Roll No. “; Nm$, Cl, Rn
WRITE #1, Nm$, Cl, Rn
INPUT “More records “; Y$
IF UCASE$(Y$) = “Y” THEN
GOTO aa
CLOSE #1
END
7. Study the following program and answer the given questions: [2]
OPEN “Detail.dat” FOR INPUT AS #1
OPEN “Temp.dat” FOR OUTPUT AS #2
INPUT “Enter name of the students “; Sn$
FOR I = 1 TO 10
INPUT #1, Nm$, Cl, A
IF Sn$ < > Nm$ THEN
WRITE #2, Nm$, Cl, A
END IF
NEXT I
CLOSE #1, #2
KILL “Detail.dat”
NAME “Temp.dat” AS “Detail.dat”
END
The main objective of given program is to delete the record associated with the name entered by the user.
Since, KILL statement will delete datafile named “detail.dat”, if we removed KILL the new data file “temp.dat” will be not renamed as “detail.dat”
Group 'C' [4x4=16]
8. Convert / calculate as per the instruction: [4]
9. a. Write a program in QBASIC that asks length, breadth and height of room and calculates its area and volume. Create a user-defined function to calculate area and sub-program to calculate volume. Hint: [A = LxB], [V = LxBxH] [4]
DECLARE FUNCTION area(l, b)
DECLARE SUB volume(l, b, h)
CLS
INPUT “Enter length breadth and height”, l, b, h
x=area(l, b)
PRINT “Area is”; x
CALL volume(l, b, h)
END
FUNCTION area(l, b)
a=l*b
area=a
END FUNCTION
SUB volume(l, b, h)
v=l*b*h
PRINT “Volume is”; v
END SUB
b. A sequential data file called “Record.txt” has stored data under the field heading Roll No., Name, Gender, English, Nepali, Maths and Computer. Write a program to display all the information of those students whose gender is ‘F' and obtained marks in computer is more than 90. [4]
OPEN “Record.txt” FOR INPUT AS #1
CLS
PRINT “Roll No”, “Name”, “Gender”, “English”, “Nepali”, “Maths”, “Computer”
WHILE NOT EOF(1)
INPUT #1, r, n$, g$, e, n, m, c
g$ = UCASE$(g$)
IF g$ = “F” AND c>90 THEN
PRINT r, n$, g$, e, n, m, c
END IF
WEND
CLOSE #1
END
10. Write a program in C language that asks a number and check whether it is odd or even. [4]
#include
int main( )
{
int n, a;
printf(“Enter any number”);
scanf(“%d”, &n);
a = n%2;
if (a == 0)
{
printf(“%d is even”, n);
}
else
{
printf(“%d is odd”, n);
}
return 0;
}
OR
Write a program in ‘C' language to display the series with their sum. 1,2,3,4,….., up to 10th terms.
#include
int main( )
{
int i, s=0;
for(i=1; i<=10; i++)
{
printf(“%d”, i);
s = s+i;
}
printf(“Sum is %d”, s);
return 0;
}