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

Model Questions and Solution (VI)

Ans: A search engine is a software system that enables users to search for information on the World Wide Web.

Ans: E-commerce (Electronic Commerce).

Ans: The default extension of MS – Access is .accdb.

Ans: Query object of MS – Access is used to retrieve data from the table.

Ans: One advantage of Modular Programming is Reusability of code.

Ans: C language is the Structured programming language

Ans: Backup.

Ans: Internet Service Provider (ISP).

a. POP: Post Office Protocol.

b. AI: Artificial Intelligence.

Group – “B”

Ans: A computer network is a set of computers connected together for the purpose of sharing resources and information; importance includes facilitating communication and resource sharing.

Ans: Advantages: Enhanced communication, global connectivity; Disadvantages: Privacy concerns, misinformation spread.

Ans: Software security refers to measures taken to protect software from unauthorized access, modification, or destruction; protection measures include encryption and access control.

Ans: E-commerce is the buying and selling of goods and services over the internet; examples of e-commerce sites include Amazon and eBay.

Ans: Mobile computing is necessary for its convenience and flexibility, enabling access to information and services on the go, and promoting productivity.

Ans: A database is an organized collection of data; examples include Oracle and MySQL.

Ans: A primary key is a unique identifier for each record in a database table; features include ensuring data integrity and facilitating efficient data retrieval.

Ans: In a database, a field is a single piece of data, while a record is a collection of fields that represent a single entity.

Ans:

In MS-Access, forms are used for data input and display, while queries are used to retrieve and manipulate data.

DECLARE SUB Result (CS)
C$= "COMPUTER"
CALL Result (C$)
END
SUB Result (C$)
FOR C= 1 TO LEN(C$) STEP 2
M$=MIDS (C$,C,1)
N$=N$ + MS
NEXT C 
PRINT C
PRINT N$
END SUB

Ans:

Dry Run:

StepCM$N$
11CC
23MCM
35UCMU
47ECMUE
59CMUE

Output:

9
CMUE
REM to display records from existing file.
OPEN "emp.text" FOR APPEND AS #1
WHILE NOT EOF (#1)
WRITE #1, eN$,posts, salary$
PRINT eN$, post$, salary
NEXT 
CLOSE #1
END

Ans: Corrected Program:

REM to display records from existing file.
OPEN "emp.txt" FOR INPUT AS #1
WHILE NOT EOF(#1)
  INPUT #1, eN$, post$, salary$
  PRINT eN$, post$, salary$
WEND
CLOSE #1
END
DECLARE FUNCTION SUM(N)
CLS
INPUT"Enter any number"; N
X= SUM(N)
PRINT"The sum of individual digit is"; X
END
FUNCTION SUM(N)
WHILE N<>O
R= N MOD 10
S= S+R
N= INT(N/10)
WENT
SUM= S
END FUNCTION

Ans: The INT function in QBASIC returns the integer part of a number, effectively truncating any decimal portion.

Ans:

The loop will repeat 3 times. Here’s the breakdown:

  1. First iteration: N = 123, R = 123 MOD 10 = 3, N = INT(123 / 10) = 12
  2. Second iteration: N = 12, R = 12 MOD 10 = 2, N = INT(12 / 10) = 1
  3. Third iteration: N = 1, R = 1 MOD 10 = 1, N = INT(1 / 10) = 0
Screenshot 2024 05 22 192801

Ans:

i. (214)10to (?)2

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

214 ÷ 2 = 107 remainder 0
107 ÷ 2 = 53 remainder 1
53 ÷ 2 = 26 remainder 1
26 ÷ 2 = 13 remainder 0
13 ÷ 2 = 6 remainder 1
6 ÷ 2 = 3 remainder 0
3 ÷ 2 = 1 remainder 1
1 ÷ 2 = 0 remainder 1

Read the remainders from bottom to top: 11010110

So, (214)10 = (11010110)2

ii. (ABC)16 to (?)2

To convert hexadecimal to binary, replace each hexadecimal digit with its binary equivalent.

A = 1010

B = 1011

C = 1100

So, (ABC)16 = (101010111100)2

iii.

(1011)2​ * (101)2

Perform binary multiplication:

        1011
     ×   101
     ------
       1011   (1011)
   + 0000     (0000, shifted left by one position)
  +1011       (1011, shifted left by two positions)
  ---------
  110111

So, (1011)2​ * (101)2= (110111)2

iv. (10101)2/ (11)2

Perform binary division.

       1
  ------------
11 | 10101
      -11
  ------------
        10
        -11
  ------------
          1
          -11
  ------------
            10
            -11
  ------------
             1

So, (10101)2/ (11)2 = (101)2

Ans: Q-BASIC Program to Calculate Area and Perimeter of a Room:

DECLARE FUNCTION CalculateArea(length, breadth)
DECLARE SUB CalculatePerimeter(length, breadth)

CLS
INPUT "Enter the length of the room: ", length
INPUT "Enter the breadth of the room: ", breadth

PRINT "Area of the room:", CalculateArea(length, breadth)
CALL CalculatePerimeter(length, breadth)
END

FUNCTION CalculateArea(length, breadth)
    CalculateArea = length * breadth
END FUNCTION

SUB CalculatePerimeter(length, breadth)
    perimeter = 2 * (length + breadth)
    PRINT "Perimeter of the room:", perimeter
END SUB

Ans: QBASIC Program to Print All Records of Students from “STUDENT.DAT” File:

OPEN "STUDENT.DAT" FOR INPUT AS #1

DO WHILE NOT EOF(1)
    INPUT #1, name$, class$, section$, address$
    PRINT "Name: "; name$; ", Class: "; class$; ", Section: "; section$; ", Address: "; address$
LOOP

CLOSE #1
END

Ans: C Program to Find the Greatest Among Two Numbers:

#include <stdio.h>

int main() {
    int num1, num2;
    printf("Enter the first number: ");
    scanf("%d", &num1);
    printf("Enter the second number: ");
    scanf("%d", &num2);

    if (num1 > num2) {
        printf("The greatest number is: %d\n", num1);
    } else if (num2 > num1) {
        printf("The greatest number is: %d\n", num2);
    } else {
        printf("Both numbers are equal.\n");
    }
    
    return 0;
}

Ans: C Program to Display the Series 2, 4, 6, 8 up to the 10th Term:

#include <stdio.h>

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

How can we help?

Leave a Reply

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