Answers On/OffJS required
Group A
- Q1.Answer the following questions in one sentence:a. Write the different modes of communication.b. What is IoT?c. List the different LAN topology.d. What is Global Variable in QBasic?e. What is tuple?f. Write any two data types used in C-language.A.The different modes of communication include verbal, non-verbal, written, and electronic communication.IoT (Internet of Things) is a network of interconnected devices that can communicate and exchange data over the Internet.The different LAN topologies are star, bus, ring, and mesh.A global variable in QBasic is a variable declared outside any procedure or function, accessible throughout the program.A tuple is an ordered collection of elements which can store different types of data, often used in programming languages like Python.Two data types used in C-language are int (integer) and float (floating-point number).
- Q2.Write appropriate technical term for the following:a. Sending and receiving messages electronically through the Internetb. Services provided by the government to public via electronic mediaA.Emaile-Governance
- Q3.Write the full form of the following:a. FTPb. B2BA.File Transfer ProtocolBusiness to Business
Group B
- Q4.Answer the following questions:a. What is computer network? Write any two advantages of computer network.b. List any four areas where AI can help us.c. What is digital footprint? Write any two points to reduce the size of digital footprint while using Internet.d. Mention the benefits and limitations of E-commerce.e. Define Encryption and Decryption.f. What is RDBMS? Write any two examples.g. Write the functions of Primary key.h. What is query? Write its type.i. Define Form and Report.A.A computer network is the interconnection of multiple computers that allows them to share data and resources.Advantages:1) Enables file sharing.2) Allows hardware sharing like printers and scanners.AI can help us in:1. Healthcare diagnosis.2. Autonomous vehicles.3. Smart assistants.4. Fraud detection.A digital footprint is the trail of data a user leaves online while using the Internet.Any two points to reduce the size of digital footprint while using Internet are:1) Limit sharing personal information online.2) Use privacy settings on social media.Benefits:1) Global market reach.2) 24/7 availability.Limitations:1) Security and privacy concerns.2) Dependency on Internet connectivity.Encryption is the process of converting plaintext into unreadable ciphertext to protect data.Decryption is the process of converting the ciphertext back into readable plaintext.RDBMS (Relational Database Management System) is a software that stores data in the form of tables with relations.Examples: MS-Access, MySQL.The functions of Primary key are:1. Primary key uniquely identifies each record in a table.2. It also ensures no duplicate or null values exist.A query is a request to access or manipulate data in a database.Types: Select query, Action query (Insert, Update, Delete), and Make-table query.Form is a database object used for data entry and user interface.Report is a database object used to summarize and present data in printable format.
- Q5.Write the output of the given program with dry run table:DECLARE FUNCTION PRE(A)CLSA=12345S=PRE(A)PRINT SENDFUNCTION PRE(A)WHILE A<>0R=A MOD 10N=N+RA=A\10WENDPRE=NEND FUNCTIONA.Dry Run Table:
Step A R (A MOD 10) N (Cumulative) A (A\10) 1 12345 5 5 1234 2 1234 4 9 123 3 123 3 12 12 4 12 2 14 1 5 1 1 15 0 Output: 15 - Q6.Re-write the given program after correcting the bugs:REM to create sequential data file "record.dat" to delete some records.CLSOPEN "record.dat" FOR INPUT AS #1OPEN "new.dat" FOR OUTPUT AS#1WHILE NOT EOF(#1)INPUT #1, N,PHPRINT N, PHINPUT "Do you want to delete this record?(y/n)"; an$IF LCASE(an$) "y" thenWRITE #2, N,PHENDIFWENDCLOSE #1, #2DEL "record.dat"NAME "new.dat" AS "record.dat"ENDA.REM To create sequential data file "record.dat" and delete some recordsCLSOPEN "record.dat" FOR INPUT AS #1OPEN "new.dat" FOR OUTPUT AS #2WHILE NOT EOF(#1)INPUT #1, N, PH$PRINT N, PH$INPUT "Do you want to delete this record? (y/n)"; an$IF LCASE) <> "y" THENWRITE #2, N, PH$END IFWENDCLOSE #1, #2KILL "record.dat"NAME "new.dat" AS "record.dat"END
- Q7.Study the following program and answer the questions:DECLARE SUB TEN (AS)CLSB$="SCIENCE"CALL TEN(B$)ENDSUB TEN (C$)L=LEN(C$)FOR I = 1 TO 4D(C$,I,L)PRINT TAB(I); D$L=L-2NEXT IEND SUBa. How many parameters are used in the above program?b. List the different library functions used in the program.A.One parameter, which is C$.MID$ and LEN are the library functions used in the program.
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:i. (11011)₂ into Decimalii. (2AF)₁₆ into Octaliii. 1100 × 100 − 101iv. 10001110₂ ÷ 10₂A.
Bit Weight (2ⁿ) Value 1 2⁴ = 16 16 1 2³ = 8 8 0 2² = 4 0 1 2¹ = 2 2 1 2⁰ = 1 1 Sum: 16 + 8 + 0 + 2 + 1 = 27Hence, (11011)₂ = (27)₁₀Converting Hex → Decimal:2×16² + 10×16¹ + 15×16⁰ = 512 + 160 + 15 = 687Converting Decimal → Octal:Division Quotient Remainder 687 ÷ 8 85 7 85 ÷ 8 10 5 10 ÷ 8 1 2 1 ÷ 8 0 1 Hence, (2AF)₁₆ = (1257)₈Converting binary to decimal:- 1100₂ = 12
- 100₂ = 4
- 101₂ = 5
Multiplying & subtracting:12 × 4 = 48 48 − 5 = 43Converting 43 → Binary:Division Quotient Remainder 43 ÷ 2 21 1 21 ÷ 2 10 1 10 ÷ 2 5 0 5 ÷ 2 2 1 2 ÷ 2 1 0 1 ÷ 2 0 1 Hence, 1100 × 100 − 101 = (101011)₂Converting to decimal:10001110₂ = 142 10₂ = 2Dividing:142 ÷ 2 = 71, Remainder = 0Converting Quotient & Remainder to Binary:71₁₀ = 1000111₂ 0₁₀ = 0₂Hence, Quotient = (1000111)₂, Remainder = (0)₂ - Q9.a. Write a program in Qbasic that ask the radius of a hemisphere and calculate its volume and total surface area. Create a user-defined function First(r) to calculate volume and sub-procedure Second(r) to calculate total surface area of a hemisphere. [Hints: TSA=3πr², V= πr²]A.DECLARE FUNCTION First(R)DECLARE SUB Second(R)CLSINPUT "Enter radius of hemisphere: "; RPRINT "Volume = "; First(R)CALL Second(R)ENDFUNCTION First(R)First = (2/3) * 3.1416 * R^3END FUNCTIONSUB Second(R)TSA = 3 * 3.1416 * R^2PRINT "Total Surface Area = "; TSAEND SUB
- Q.b. A sequential data file called "list.dat" has stored data under the field heading items name, quantity and rate. Write a program to update all the records by increasing the rate by 10%.A.CLSOPEN "list.dat" FOR INPUT AS #1OPEN "temp.dat" FOR OUTPUT AS #2WHILE NOT EOF(1)INPUT #1, Item$, Qty, RateRate = Rate * 1.1WRITE #2, Item$, Qty, RateWENDCLOSE #1, #2KILL "list.dat"NAME "temp.dat" AS "list.dat"END
- Q10.Write a program in C language to enter a number and find out whether it is positive or negative.OR,Write a C program to display the sum of first 10 natural number.A.#include <stdio.h>int main() {int num;printf("Enter a number: ");scanf("%d", &num);if(num > 0)printf("The number is positive.");else if(num < 0)printf("The number is negative.");elseprintf("The number is zero.");return 0;}#include <stdio.h>int main() {int i, sum=0;for(i=1; i<=10; i++) {sum += i;}printf("Sum = %d", sum);return 0;}