1. Home
  2. Docs
  3. Model Question solution(S...
  4. Computer Science
  5. Model Questions Solution (V)

Model Questions Solution (V)

Ans: A web browser is a software application used to access and view websites on the internet.

Ans: Email and online banking.

Ans: 64 characters.

Ans: Yes/No.

Ans: Modular programming is a software design technique that emphasizes dividing a program into separate, self-contained modules that can be developed, tested, and maintained independently.

Ans: int and char.

Ans: Internet.

Ans: Antivirus software.

a. FTP: File Transfer Protocol.

b. MAN: Metropolitan Area Network.

Ans: Network topology refers to the arrangement of various elements (links, nodes, etc.) in a computer network; two types are star topology and bus topology.

Ans: Cyber law is the legal framework that governs activities in the digital environment, while cyber crime refers to illegal activities conducted using computers and the internet.

Ans: A password is a string of characters used to authenticate a user to access a system or service; password protection is important to safeguard sensitive information from unauthorized access.

Ans: Online payment is the transfer of funds over the internet to complete a transaction; two methods in Nepal are eSewa and Khalti.

Ans: Virtual reality is a simulated experience that can be similar to or completely different from the real world; it is used in gaming and medical training.

Ans: DBMS (Database Management System) is software for creating, managing, and manipulating databases; four objects in MS-Access are tables, queries, forms, and reports.

Ans: Validation rule is a criterion that data entered into a database field must meet, and validation text is the message that appears when the entered data violates the validation rule.

Ans: A form is a database object that provides a user-friendly interface for data entry and display; two advantages are easier data input and enhanced data validation.

Ans: A foreign key is a field in one table that uniquely identifies a row of another table; a primary key is necessary to uniquely identify each record in a table and ensure data integrity.

DECLARE SUB Series(A)
CLS
A= 20
CALL Series(A)
END
SUB Series(A)
FOR K = 1 to 5
PRINT A;
A= A+10
NEXT K
END SUB

Ans: Output of the Given Program with Dry Run Table:

Dry Run Table:

KA (Initial)A (After Increment)Output
1203020
2304030
3405040
4506050
5607060

Output:

20 30 40 50 60
REM Program to make a word reverse
DECLARE FUNCTION Rev$(N$)
CLS
INPUT "Enter a word": N$
DISPLAY "Reversed is": Rev$(N$)
END
FUNCTION Rev$(N$)
FOR K= LEN$(N$) to 1 STEP-1
B$=B$+MID$(N$,1,K)
NEXT K
B$=REV$
END FUNCTION

Ans: Corrected program:

REM Program to make a word reverse
DECLARE FUNCTION Rev$(N$)
CLS
INPUT "Enter a word: ", N$
PRINT "Reversed is: "; Rev$(N$)
END

FUNCTION Rev$(N$)
    B$ = ""
    FOR K = LEN(N$) TO 1 STEP -1
        B$ = B$ + MID$(N$, K, 1)
    NEXT K
    Rev$ = B$
END FUNCTION
OPEN "EMP.DAT" FOR INPUT AS #1
DO
INPUT #1, N$, A$, S
IF UCASE$(A$)= "KATHMANDU" THEN
PRINT N$, A$, S
END IF 
LOOP WHILE NOT EOF(1)
CLOSE #1
END

Ans: The statement INPUT #1, N$, A$, S reads a line of data from the file EMP.DAT and assigns the values to the variables N$, A$, and S.

Ans: If “UCASE” is removed, the program will only print records where the value of A$ is exactly “KATHMANDU” in uppercase, and it will not match entries with lowercase or mixed case letters, potentially missing some records.

Screenshot 2024 05 22 123543

Ans:

a. (10110011)2 to (?)16

To convert binary to hexadecimal, group the binary digits into sets of four, starting from the right, and then replace each group with its hexadecimal equivalent.

Binary: 1011 0011

Hexadecimal: B3

So, (10110011)2 = (B3)16

b. (410)10 to (?)2

To convert decimal to binary, repeatedly divide the number by 2 and write down the remainders in reverse order.

4 ÷ 2 = 2 remainder 0
2 ÷ 2 = 1 remainder 0
1 ÷ 2 = 0 remainder 1

Read the remainders from bottom to top: 100

So, (410)10 = (100)2

c. (1001 + 110)2 – (1000)2

Perform binary addition first, then subtraction.

    1001
  +  110
  ------
    1111
-    1000
--------
      111

So, (1001 + 110)2 – (1000)2 = (111)2

d. (10110)2​ ÷ (101)2

Perform binary division.

       1
 __________
101 ) 10110
      -101
 __________
       1010
       -1010
 __________
          0

So, (10110)2​ ÷ (101)2​ = (1)2

Ans: QBASIC Program to Calculate Area and Circumference of a Circle:

DECLARE FUNCTION CalculateArea(radius)
DECLARE SUB CalculateCircumference(radius)

CLS

' Function to calculate area of circle
FUNCTION CalculateArea(radius)
    CalculateArea = 3.14159 * radius * radius
END FUNCTION

' Sub procedure to calculate circumference of circle
SUB CalculateCircumference(radius)
    circumference = 2 * 3.14159 * radius
    PRINT "The circumference of the circle is: "; circumference
END SUB

INPUT "Enter the radius of the circle: ", radius
PRINT "The area of the circle is: "; CalculateArea(radius)
CALL CalculateCircumference(radius)

END

Ans: QBASIC Program to Create a Sequential Data File for Employee Records:

OPEN "Employee.dat" FOR OUTPUT AS #1

DO
    CLS
    INPUT "Enter employee name: ", Name
    INPUT "Enter employee post: ", Post
    INPUT "Enter employee address: ", Address
    INPUT "Enter employee salary: ", Salary
    
    ' Write data to file
    PRINT #1, Name; ", "; Post; ", "; Address; ", "; Salary
    
    ' Ask user if they want to continue entering records
    INPUT "Do you want to enter another employee record? (Y/N): ", choice$
    IF UCASE$(choice$) <> "Y" THEN EXIT DO
LOOP

CLOSE #1
END

Ans: C Program to Check Whether a Number is Positive, Negative, or Zero:

#include <stdio.h>

int main() {
    int number;
    
    printf("Enter a number: ");
    scanf("%d", &number);
    
    if (number > 0) {
        printf("%d is a positive number.\n", number);
    } else if (number < 0) {
        printf("%d is a negative number.\n", number);
    } else {
        printf("The number is zero.\n");
    }
    
    return 0;
}

Ans: C Program to Display the Series with Their Sum:

#include <stdio.h>

int main() {
    int i, sum = 0;
    
    printf("Series: ");
    for (i = 1; i <= 10; i++) {
        printf("%d ", i);
        sum += i;
    }
    
    printf("\nSum of series: %d\n", sum);
    
    return 0;
}

How can we help?

Leave a Reply

Your email address will not be published. Required fields are marked *