Answers On/OffJS required
Group A
- Q1.Answer the following questions in one sentence:a. What is search engine?b. What is the business done through the internet?c. Which 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?e. What is Modular Programming?f. Write any two features of C language.A.A search engine is a software system that allows users to find information on the internet by entering keywords or queries and returns a ranked list of web pages and resources relevant to those terms.Business done through the internet, commonly called e-commerce, is the activity of buying, selling, or exchanging goods and services and conducting related financial or commercial transactions online.In MS-Access, the Short Text (formerly called Text) data type is used to store numeric characters that are meant as text (for example phone numbers) and special symbols.To modify the table structure (for example add, delete, or change fields) in MS-Access you use Design View, while to edit the table’s data you use Datasheet View.Modular programming is a software design technique in which a program is divided into separate, independent modules or functions, each of which performs a specific task and can be developed and tested independently.Two features of the C language are that it provides low-level memory access through pointers which enables systems programming, and it is highly portable so programs written in C can be compiled on many different platforms with little or no modification.
- Q2.Write appropriate technical term for the following:a. Law that governs the legal issues of cyberspace.b. The smallest unit to represent information on quantum computer.A.The technical term is Cyber Law (also called Information Technology Law).The smallest unit to represent information on a quantum computer is called a qubit (quantum bit).
- Q3.Write the full form of the following:A.STP — The full form of STP is Shielded Twisted Pair (commonly used in networking cable types).WAP — The full form of WAP is Wireless Application Protocol, which is a set of protocols for accessing information over a mobile wireless network.
Group B
- Q4.Answer the following questions:a. What is computer network? Enlist any two advantages of it.A.A computer network is a collection of interconnected computers and devices that can communicate and share resources with each other; two advantages are that it enables resource sharing (such as printers and files) and allows communication between remote users (such as email and messaging).
- Q.b. What is computer ethics? Write any two of them.A.Computer ethics is the study of moral, legal, and social issues arising from the use of computers and information technology; two common principles are respecting privacy of user data and avoiding software piracy (using only properly licensed software).
- Q.c. What is software security? Write any two measures of hardware security.A.Software security is the practice of designing, implementing, and maintaining software so that it resists attacks and prevents unauthorized access, data breaches, and tampering; two measures of hardware security are using BIOS/UEFI passwords or secure boot and physically securing devices with locks or tamper-evident seals.
- Q.d. What is m-Commerce? Write its two important services.A.m-Commerce (mobile commerce) is the buying and selling of goods and services through mobile devices; two important services are mobile banking and mobile payments (for example, contacting a merchant and completing payment through a mobile wallet).
- Q.e. What is IoT? Write any two importance of it.A.The Internet of Things (IoT) is a network of physical objects embedded with sensors, software, and connectivity to collect and exchange data over the internet; two important benefits are enabling remote monitoring/automation of devices and providing data for analytics to improve efficiency and decision making.
- Q.f. What is database? Give any two examples.A.A database is an organized collection of structured information or records stored electronically so they can be easily accessed, managed, and updated; two examples are a customer table in a company’s relational database (e.g., MySQL) and a library’s catalogue file.
- Q.g. What is primary key? List any two advantages of it.A.A primary key is a field or a combination of fields in a database table that uniquely identifies each record in that table; two advantages are that it prevents duplicate records and enables efficient retrieval and indexing of rows.
- Q.h. What is data sorting? List any two advantages of using it.A.Data sorting is the process of arranging records in a specified order (for example, ascending or descending) based on one or more fields; two advantages are that it makes searching and reporting faster and it helps users to see trends or the highest/lowest values quickly.
- Q.i. What types of work is done in MS-Access using Form and Query object?A.In MS-Access, Forms are used for user-friendly data entry, display, and navigation (for example entering new records and editing existing ones), while Queries are used to retrieve, filter, sort and perform calculations on data from one or more tables (for example selecting students with marks above a threshold).
- Q5.Write down the output of the given program. Show with dry run in table.DECLARE SUB SHOW (A)CLSN = 87CALL SHOW (N)ENDSUB SHOW (A)DOB = A MOD 6 + 3IF B MOD 4 = 0 THEN GOTO AAPRINT B;AA:A = A - 10LOOP WHILE A >= 50END SUBA.Execution and output (final printed result):The program prints:6 6(both values printed on the same output line separated by spaces, because PRINT B; prints without a newline in QBASIC.)Dry-run table (each loop iteration):
Iteration A (start) A MOD 6 B = (A MOD 6) + 3 Is B MOD 4 = 0? Action taken A (after A=A-10) 1 87 3 6 No PRINT 6 then subtract 77 2 77 5 8 Yes Skip PRINT, subtract 67 3 67 1 4 Yes Skip PRINT, subtract 57 4 57 3 6 No PRINT 6 then subtract 47 Loop end 47 — — — Exit because 47 < 50 — So the two values printed in order are 6 and 6. - Q6.Re-write the given program after correcting the bugs:REM to add record in an existing fileCLSOPEN "Record.Dat" FOR OUTPUT AS #1AA:INPUT "Enter Name, Class and Roll No. "; Nm$, Cl, RnINPUT #2, Nm$, Cl, RnINPUT "More records "; Y$IF UCASE) = "Y" THEN GOTO aaCLOSE "Rrecord.dat"ENDA.REM to add record in an existing fileCLSOPEN "Record.Dat" FOR OUTPUT AS #1AA:INPUT "Enter Name, Class and Roll No. "; Nm$, Cl, RnINPUT #2, Nm$, Cl, RnINPUT "More records "; Y$IF UCASE) = "Y" THEN GOTO aaCLOSE "Rrecord.dat"END
- Q7.Study the following program and answer the given questions:OPEN "Detail.dat" FOR INPUT AS #1OPEN "Temp.dat" FOR OUTPUT AS #2INPUT "Enter name of the students "; Sn$FOR I = 1 TO 10INPUT #1, Nm$, Cl, AIF Sn$ <> Nm$ THENWRITE #2, Nm$, Cl, AEND IF NEXT I CLOSE #1, #2KILL "Detail.dat"NAME "Temp.dat" AS "Detail.dat"ENDa. What is the main objective of the program given above?b. Do you get any problem in the above program if KILL statement is removed? Give reason.A.The main objective of the program is to remove records whose student name matches the input Sn$ by copying all records except those with that name into a temporary file and then replacing the original file with the temporary file.Yes, if the KILL "Detail.dat" line is removed, the subsequent NAME "Temp.dat" AS "Detail.dat" will fail because a file named Detail.dat already exists, and most systems require the target filename to be absent before renaming another file to that name.
Practice Without Boundaries.
Premium gives you full access, zero ads, and unlimited custom paper generation. Study your way, every day.
Group C
- Q8.Convert/calculate as per the instruction:a. (11001101)2 = (?)16b. (524)10 = (?)2c. (1010)2 X (110)2 - (1011)2 = (?)2d. (10110)2 ÷ (101)2A.Group the binary number into 4-bit groups from right: 1100 1101 → 1100 = C (hex), 1101 = D (hex).So, (11001101)2 = (CD)16Convert 524 to binary by successive division by 2 (remainders bottom to top): 524 ÷2 → remainder sequence (from last to first) gives 1 0 0 0 0 0 1 1 0 0.(524)10 = (1 0 0 0 0 0 1 1 0 0)2Convert to decimal for easier arithmetic: (1010)₂ = 10₁₀, (110)₂ = 6₁₀, product = 60₁₀. Subtract (1011)₂ = 11₁₀ gives 60 − 11 = 49₁₀. Convert 49₁₀ to binary: 49 = 32+16+1 → binary 110001.So the result is (110001)2.Convert to decimal: (10110)₂ = 22₁₀, (101)₂ = 5₁₀. Performing integer division: 22 ÷ 5 gives quotient 4 and remainder 2. In binary, quotient = (100)₂ and remainder = (10)₂.So the quotient is (100)2 with remainder (10)2.
- Q9.(a) Write a QBASIC program that asks length, breadth and height of a room and calculates its area and volume; create a user-defined function to calculate area and a sub-program to calculate volume.A.REM Program to compute area and volume of a roomCLSINPUT "Enter length: ", LINPUT "Enter breadth: ", BINPUT "Enter height: ", HA = Area(L, B)CALL Volume(L, B, H, V)PRINT "Area of the room (L x B) is: "; APRINT "Volume of the room (L x B x H) is: "; VENDFUNCTION Area(L, B)Area = L * BEND FUNCTIONSUB Volume(L, B, H, V)V = L * B * HEND SUB
- Q.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 program to display all the information of those students whose gender is 'F' and obtained marks in computer is more than 90.A.REM Display female students with Computer > 90CLSOPEN "Record.txt" FOR INPUT AS #1PRINT "RollNo"; TAB(8); "Name"; TAB(30); "Gender"; TAB(38); "Eng"; TAB(44); "Nep"; TAB(50); "Maths"; TAB(58); "Comp"PRINT STRING$(80, "-")DO WHILE NOT EOF(1)INPUT #1, Roll, Name, Eng, Nep, Maths, CompIF UCASE) = "F" AND Comp > 90 THENPRINT Roll; TAB(8); Name; TAB(38); Eng; TAB(44); Nep; TAB(50); Maths; TAB(58); CompEND IFLOOPCLOSE #1END
- Q10.Write a program in C language that asks a number and checks whether it is odd or even.OR,Write a program in 'C' language to display the series with their sum. 1,2,3,4, ....., up to 10th terms.A.#include <stdio.h>int main(void) {int num;printf("Enter an integer: ");if (scanf("%d", &num) != 1) {printf("Invalid input. ");return 1;}if (num % 2 == 0) {printf("%d is even. ", num);} else {printf("%d is odd. ", num);}return 0;}#include <stdio.h>int main() {int i, sum = 0;printf("Series: ");for(i = 1; i <= 10; i++) {printf("%d", i);if(i < 10) {printf(", ");}sum = sum + i;}printf("\nSum of the series = %d ", sum);return 0;}