Group – “A” ( 10 X 1 = 10)
1. Answer the following questions in one sentence: ( 6 X 1 = 6 )
a. What is search engine?
Ans: A search engine is a software system that enables users to search for information on the World Wide Web.
b. What is the business done through the internet called?
Ans: E-commerce (Electronic Commerce).
c. What is the default extension of MS – Access?
Ans: The default extension of MS – Access is .accdb.
d. Which object of MS – Access is used to retrieve data from the table?
Ans: Query object of MS – Access is used to retrieve data from the table.
e. Write any one advantage of Modular Programming.
Ans: One advantage of Modular Programming is Reusability of code.
f. Which is the Structured programming language?
Ans: C language is the Structured programming language
2. Write appropriate technical term of the following: ( 2 X 1 = 2)
a. A system of copying data and information reading in computer into another location.
Ans: Backup.
b. A company which provides services of Internet.
Ans: Internet Service Provider (ISP).
3. Write the full form of the following:
a. POP: Post Office Protocol.
b. AI: Artificial Intelligence.
Group – “B”
4. Answer the following questions: ( 9 X 2 = 18 )
a. What is computer network? List any two importance of computer network.
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.
b. Write any two advantages and disadvantages of social media.
Ans: Advantages: Enhanced communication, global connectivity; Disadvantages: Privacy concerns, misinformation spread.
c. Define software security. Write any two protection measures for it.
Ans: Software security refers to measures taken to protect software from unauthorized access, modification, or destruction; protection measures include encryption and access control.
d. Define E – commerce. Write the name of any two E – commerce sites.
Ans: E-commerce is the buying and selling of goods and services over the internet; examples of e-commerce sites include Amazon and eBay.
e. Why mobile computing is necessary in present time? Write any two importance of it.
Ans: Mobile computing is necessary for its convenience and flexibility, enabling access to information and services on the go, and promoting productivity.
f. Define database. Give any two examples.
Ans: A database is an organized collection of data; examples include Oracle and MySQL.
g. What is primary key? Write any two features of it.
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.
h. Define field and record.
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.
i. What type of work is done in MS – Access using form and query object?
Ans:
In MS-Access, forms are used for data input and display, while queries are used to retrieve and manipulate data.
5. Write down the output of the given program. Show with dry run in table.[2]
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:
Step | C | M$ | N$ |
---|---|---|---|
1 | 1 | C | C |
2 | 3 | M | CM |
3 | 5 | U | CMU |
4 | 7 | E | CMUE |
5 | 9 | CMUE |
Output:
9
CMUE
6. Re- write the given program after correcting the bug. [2]
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
7. Study the following program and answer the given questions. [2]
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
a. Write the function of INT.
Ans: The INT
function in QBASIC returns the integer part of a number, effectively truncating any decimal portion.
b. How many time the WHILE……. WENT LOOP repeats if the value of N is 123?
Ans:
The loop will repeat 3 times. Here’s the breakdown:
- First iteration:
N = 123
,R = 123 MOD 10 = 3
,N = INT(123 / 10) = 12
- Second iteration:
N = 12
,R = 12 MOD 10 = 2
,N = INT(12 / 10) = 1
- Third iteration:
N = 1
,R = 1 MOD 10 = 1
,N = INT(1 / 10) = 0
8. Convert / Calculate as per the instruction:
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
9. a. Write a program in Q – BASIC that asks length and breadth of a room and calculate its area and perimeter. Create a user defined FUNCTION to calculate area and SUB program to calculate perimeter.
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
b. Students` name, class, section and address are stored in a data file called “STUDENT.DAT” Write a program to print all the records of students.
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
10. Write a program in C language and asks any two numbers and displays the greatest among them.
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;
}
OR
Write a program in C language to display the series 2,4,6,8 up to the 10th term.
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;
}