Answers On/OffJS required
Group A
- Q1.Answer the following questions in one sentence:a. Write the different architecture of computer network.b. What is Cyber bullying?c. Write any two services provided by Internet.d. Which query is used to make changes to the data present in the database?e. What is Primary Key?f. Write any two types of operators used in C language.A.The two main architectures of a computer network are Client–Server architecture and Peer-to-Peer architecture.Cyber bullying is an act of harassing, threatening, or insulting a person using digital devices, social media, or the Internet.The Internet provides various services such as email communication and online web browsing.An Update query is used to modify or change existing data in a database table.A primary key is a unique field in a database table that identifies each record without duplication.Two commonly used operators in C language are arithmetic operators and relational operators.
- Q2.Write appropriate technical term for the following:a. Law that governs the legal issues of cyberspace.b. The website that searches documents for specified keywords on the Internet.A.Cyber LawSearch Engine
- Q3.Write the full form of the following:a. POPb. ISPA.Post Office ProtocolInternet Service Provider
Group B
- Q4.Answer the following questions:a. Differentiate between LAN and MAN.b. What is network topology? Write about star topology with suitable diagram.c. Write any four opportunities and threats in social media.d. What is Online Payment? Write the different forms of e-payment in Nepal.e. What is cloud computing? What are the services provided by cloud computing?f. Define Data and Information.g. What is MS-Access? Write the features of MS-Access.h. Define action query.i. What is table? Write the basic components of table.A.A LAN (Local Area Network) covers a small geographical area like a building or school, whereas a MAN (Metropolitan Area Network) covers a larger area such as a town or city.Network topology is the physical or logical arrangement of computers and devices in a network.In star topology, all computers are connected to a central hub or switch that controls communication.PC\PC — HUB/SWITCH — PC/PCSocial media provides opportunities such as online learning and business promotion, while it also poses threats like cyber bullying and identity theft.Online payment is a digital method of transferring money electronically through the Internet.In Nepal, common forms of e-payment include eSewa, Khalti, Mobile Banking, and Connect IPS.Cloud computing is an Internet-based technology that provides shared computing resources on demand.Its services include Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (SaaS).Data is raw, unorganized facts and figures.Information is processed, organized, and meaningful data.MS-Access is a relational database management system developed by Microsoft used to store and manage data.Its features include tables, queries, forms, reports, macros, and data validation.An action query is a type of query in MS-Access that performs actions such as inserting, updating, deleting, or creating new tables.A table is a database object used to store data in rows and columns.The basic components of a table are fields (columns) and records (rows).
- Q5.Write down the output of the given program. Show with dry run in table.DECLARE SUB TEST(A$)CLSA$="PABSON"CALL TEST(A$)ENDSUB TEST(A$)FOR I=1 TO LEN(A$)B(A$,1,1)C+B$NEXT IPRINT C$END SUBA.
I MID$(A$,1,1) C$ 1 P P 2 P PP 3 P PPP 4 P PPPP 5 P PPPPP 6 P PPPPPP Final Output:PPPPPP - Q6.Re-write the given program after correcting the bugs:REM to display the data from sequential data file"marks.dat" having marks in english more than 35,CLSOPEN "marks.dat" FOR OUTPUT AS #1WHILE NOT EOF(2)INPUT #1, NS, ENG, NEP, SCIENG+NEP+SCI=TOTIF TOT>35 THEN PRINT NS, ENG, NEP, SCINEXTCLOSE #1ENDA.REM to display the data from sequential data file "marks.dat" having marks in english more than 35CLSOPEN "marks.dat" FOR INPUT AS #1WHILE NOT EOF(1)INPUT #1, NS, ENG, NEP, SCITOT = ENG + NEP + SCIIF TOT > 35 THEN PRINT NS, ENG, NEP, SCIWENDCLOSE #1END
- Q7.Study the following program and answer the given questions:DECLARE FUNCTION GRADE (A)CLSINPUT "ENTER A NUMBER";BC=GRADE(B)PRINT CENDFUNCTION GRADE(X)WHILE X<>0R= X MOD 10Z=Z+RX=INT(X/10)WENDGRADE=ZEND SUBa. How many parameters are used in the above program?b. List the different library functions used in the program.A.The above program uses one parameter, which is X.The library functions used in the program are MOD and INT.
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 instruction:a. (111)₁₀ = (?)₂(b) Convert (212)₈ into Hexadecimal(c) 11001 + 10101 (Binary Addition)(d) Convert (1001011100)₂ into DecimalA.
Division Quotient Remainder 111 ÷ 2 55 1 55 ÷ 2 27 1 27 ÷ 2 13 1 13 ÷ 2 6 1 6 ÷ 2 3 0 3 ÷ 2 1 1 1 ÷ 2 0 1 Writing remainders bottom to top:(111)₁₀ = (1101111)₂Converting Octal to Decimal:Digit Place value Calculation 2 8² = 64 2 × 64 = 128 1 8¹ = 8 1 × 8 = 8 2 8⁰ = 1 2 × 1 = 2 Total = 128 + 8 + 2 = 138₁₀Now, Converting Decimal to Hexadecimal (Divide by 16)Division Quotient Remainder 138 ÷ 16 8 10 (A) 8 ÷ 16 0 8 Writing remainders bottom to top:(212)₈ = (8A)₁₆Column 1 1 0 0 1 Number 1 1 1 0 0 1 Number 2 1 0 1 0 1 Carry 1 0 1 0 0 Sum 1 0 1 1 1 Final Answer: (101110)₂Bit Weight (2ⁿ) Value 1 2⁹ = 512 512 0 2⁸ = 256 0 0 2⁷ = 128 0 1 2⁶ = 64 64 0 2⁵ = 32 0 1 2⁴ = 16 16 1 2³ = 8 8 1 2² = 4 4 0 2¹ = 2 0 0 2⁰ = 1 0 Total = 512 + 64 + 16 + 8 + 4 = 604₁₀So, (1001011100)₂ = (604)₁₀ - Q9.a. Write a program in qbasic that ask to enter three different numbers then find out Product and Average. Create a user defined function PROD() to calculate product and sub procedure AVG() to calculate average.A.DECLARE FUNCTION PROD(A,B,C)DECLARE SUB AVG(A,B,C)CLSINPUT "Enter three different numbers: "; X, Y, ZPRINT "Product = "; PROD(X,Y,Z)CALL AVG(X,Y,Z)ENDFUNCTION PROD(A,B,C)PROD = A * B * CEND FUNCTIONSUB AVG(A,B,C)A1 = (A + B + C) / 3PRINT "Average = "; A1END SUB
- Q9.b. A sequential data file called "data.dat" has stored data under the field heading item name, quantity and rate. Write a program to display all the records with total.A.CLSOPEN "data.dat" FOR INPUT AS #1PRINT "Item Name", "Quantity", "Rate", "Total"WHILE NOT EOF(1)INPUT #1, IN$, Q, RT = Q * RPRINT IN$, Q, R, TWENDCLOSE #1END
- Q10.Write a program in C language to ask to enter a number then find out whether it is even or odd.OR,Write a C program to display the series 1, 4, 9, up to 10th term.A.#include <stdio.h>int main() {int n;printf("Enter a number: ");scanf("%d", &n);if(n % 2 == 0)printf("The number is even.");elseprintf("The number is odd.");return 0;}#include <stdio.h>int main() {int i;for(i = 1; i <= 10; i++) {printf("%d ", i * i);}return 0;}