Answers On/OffJS required
Group A
- Q1.Answer the following questions in one sentence:a. What is web browser?b. What is the business conducted through wireless handheld device?c. Which data type is used to store video file in MS-Access?d. What is Filtering?e. Write difference between function procedure and sub procedure.f. Write any two header files of C language.A.A web browser is an application software that allows users to access, retrieve, and view information or websites on the World Wide Web.Business conducted through wireless handheld devices is called mobile commerce (m-commerce), where buying, selling, banking, and transactions are done using smartphones or tablets.In MS-Access, the Attachment data type is used to store video files, images, or other multimedia objects.Filtering is the process of displaying only those records in a database that meet specific criteria while hiding the remaining ones.A function procedure returns a single value after execution, whereas a sub procedure performs a task but does not return a value.Two header files of C language are stdio.h (for input/output functions) and math.h (for mathematical functions).
- Q2.Write appropriate technical term for the following:a. The act of copying someone else's work and publishing it as your own work.b. The process of converting plaintext into ciphertext.A.PlagiarismEncryption
- Q3.Write the full form of the following:A.ASCII — American Standard Code for Information InterchangeMAC — Media Access Control
Group B
- Q4.Answer the following questions:a. Define computer network. List the types of computer network.b. What is cyber ethics? List any two of them.c. What is computer security? Write any two measures of hardware security.d. What is m-computing? Write advantages of m-computing.e. What is VR? Write two application areas of VR.f. What is query? List its types.
g. Define filtering. Write two examples of it.h. Define primary key. Write any two advantages of it.i. What is field and database?A.A computer network is a group of interconnected computers and devices that communicate and share resources with each other; its types include LAN, MAN, and WAN.Cyber ethics refers to moral principles and responsible behavior while using computers and the internet; two examples are not spreading cyberbullying and respecting others' privacy online.Computer security refers to protecting computer systems and data from unauthorized access, misuse, or damage; two hardware security measures are locking computer rooms and installing CCTV surveillance.m-computing (mobile computing) is the use of portable devices to access computing services anytime and anywhere; its advantages include mobility and real-time communication.Virtual Reality (VR) is a technology that creates an artificial 3D environment that users can interact with using special devices; it is used in gaming and medical training.A query is a request to retrieve specific data from a database; its types include Select query and Action query.Filtering is the process of extracting only the records that satisfy given conditions; examples include displaying students who scored above 80 and filtering employees working in the HR department.A primary key is a unique field in a database table used to identify each record; its advantages include preventing duplicate records and speeding up data searching.A field is a single column in a table that stores one type of data, while a database is an organized collection of related data stored electronically. - Q5.Write down the output of the given program with dry-run:CLSP=1: Q=1CALL DISP(P,Q)ENDSUB DISP(M,N)WHILE(N<=5)PRINT MM=M*10+NN=N+1WENDEND SUBA.111112112311234Dry-run Table:
Iteration M (before print) N Printed New M = M*10+N New N 1 1 1 1 11 2 2 11 2 11 112 3 3 112 3 112 1123 4 4 1123 4 1123 11234 5 5 11234 5 11234 112345 6 NOTE: Loop stops because N = 6 > 5. - Q6.Correct the given program:REM To display some records from data file "info.dat"CLSOPEN "MARKS.DAT" FOR INPUT AS #1PRINT "Roll Number","Name", "English", "Nepali", "Maths"DO WHILE NOT EOFOINPUT #1,RN,NS,E,Ne,MPRINT R,NS,E,Ne, MEND WHILECLOSE #1ENDA.REM To display some records from data file "info.dat"CLSOPEN "MARKS.DAT" FOR INPUT AS #1PRINT "Roll Number", "Name", "English", "Nepali", "Maths"DO WHILE NOT EOF(1)INPUT #1, RN, NS$, E, Ne, MPRINT RN, NS$, E, Ne, MLOOPCLOSE #1END
- Q7.Study the program and answer questions:DECLARE SUB TEST (A, B, C)LET X = 4LET Y = 7LET Z = 12CALL TEST (X, Y, Z)PRINT X, Y, ZENDSUB TEST (A, B, C)A=A+3B = B+2SUM A+B+CPRINT SUMEND SUBa. List the arguments and parameters used in the above program.b. List local variables used in each module.A.Arguments: X, Y, ZParameters: A, B, CIn main module: X, Y, ZIn sub-procedure: A, B, C, SUM
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. (10101011)₂ = (?)₁₆b. (641)₁₀ = (?)₂c. (1010)₂ × (11)₂ − (101)₂d. (101101)₂ + (110)₂A.As per the computational table, we know that:1010 = A1011 = BSo, (10101011)₂ = (AB)₁₆Step-by-step division by 2 table:
Division Quotient Remainder 641 ÷ 2 320 1 320 ÷ 2 160 0 160 ÷ 2 80 0 80 ÷ 2 40 0 40 ÷ 2 20 0 20 ÷ 2 10 0 10 ÷ 2 5 0 5 ÷ 2 2 1 2 ÷ 2 1 0 1 ÷ 2 0 1 Step 2: Read remainders from bottom to topTherefore, (641)₁₀ = (1010000001)₂Converting each to decimal first:(1010)₂ = 10₁₀(11)₂ = 3₁₀(101)₂ = 5₁₀Step 1: Multiplying10 × 3 = 30Step 2: Subtracting30 − 5 = 25Step 3: Converting 25 back to binaryDivide by 2:Division Quotient Remainder 25 ÷ 2 12 1 12 ÷ 2 6 0 6 ÷ 2 3 0 3 ÷ 2 1 1 1 ÷ 2 0 1 Reading remainders bottom → top we get: (1010)₂ × (11)₂ − (101)₂ = (11001)₂Converting to decimal first:(101101)₂ = 45₁₀(110)₂ = 6₁₀Step 1: Adding45 + 6 = 51Step 2: Convert 51 to binaryDivision Quotient Remainder 51 ÷ 2 25 1 25 ÷ 2 12 1 12 ÷ 2 6 0 6 ÷ 2 3 0 3 ÷ 2 1 1 1 ÷ 2 0 1 Reading from bottom → top we get: (101101)₂ + (110)₂ = (110011)₂ - Q9.a. Write a program in QBASIC that asks for the radius and height of a cylinder and calculates its surface area and volume. Create a user-defined function to calculate the surface area and a sub-program to calculate the volume. [Hint: Surface Area = 2*π*r*(r+h), Volume = π*r²* h]A.REM Surface area and volume of a cylinderCLSINPUT "Enter radius: ", rINPUT "Enter height: ", hSA = Surface(r, h)CALL Volume(r, h, V)PRINT "Surface Area = "; SAPRINT "Volume = "; VENDFUNCTION Surface(r, h)pi = 3.1416Surface = 2 * pi * r * (r + h)END FUNCTIONSUB Volume(r, h, V)pi = 3.1416V = pi * r * r * hEND SUB
- Q.b. A sequential data file called "Employee.txt" has stored data under the field headings Employee ID; Name, Gender, Department, and Salary, Write a program to display all the information of those employees whose salary is greater than 50,000 and the department is "IT".A.CLSOPEN "Employee.txt" FOR INPUT AS #1PRINT "ID", "Name", "Gender", "Department", "Salary"PRINT STRING$(60, "-")DO WHILE NOT EOF(1)INPUT #1, ID, Name, Dept$, SalaryIF Salary > 50000 AND UCASE) = "IT" THENPRINT ID, Name, Dept$, SalaryEND IFLOOPCLOSE #1END
- Q10.Write a program in C language that asks three integer number and display smallest among three numbers.OR,Write a program in C language to display reverse of an multi digit integer input number.A.#include <stdio.h>int main() {int a, b, c;printf("Enter three integers: ");scanf("%d %d %d", &a, &b, &c);if(a <= b && a <= c)printf("%d is the smallest number. ", a);else if(b <= a && b <= c)printf("%d is the smallest number. ", b);elseprintf("%d is the smallest number. ", c);return 0;}#include <stdio.h>int main() {int num, rev = 0, rem;printf("Enter a number: ");scanf("%d", &num);while(num > 0) {rem = num % 10;rev = rev * 10 + rem;num = num / 10;}printf("Reversed number = %d ", rev);return 0;}