SEE time
Chapter 1: Networking and Telecommunication
1.What is the internet?
2 What is a browser?
3. What is a search engine?
4 What is the business done through the internet?
5 Write the name of any two search engines.
6 What is social media?
7. Define bandwidth
8.What is an email?
9. What is a computer network?
10. Define bounded media
11. What is simplex mode?
12. What is downloading?
13. What is uploading?
14. What is a Network Interface Card?
15. What is a computer network? List the main goals of a computer network.
16. What is a client computer? How does it differ from a network server?
17. What is a network protocol? Give any three examples.
18. What is a peer-to-peer network? Explain with the help of a diagram.
19. Differentiate between LAN and WAN. Give one example of each.
20. Define physical LAN topology? Draw a neat diagram of physical star topology.
21. Differentiate between bounded media and unbounded media.
22. What is radio wave transmission? List its advantages.
23. What is the Internet? What are the major services provided by the Internet?
24. What are the advantages of the Internet?
25. Explain any five services of the Internet.
26. What is electronic mail? What are the advantages of an electronic mail?
27. What is communication media? Differentiate between bounded and unbounded media.
28. Give reasons that "Computer networks reduce the cost of operation."
1. The internet is a global network of interconnected computers that enables communication and information sharing.
2. A browser is a software application that allows users to access and navigate the World Wide Web to view websites.
3. A search engine is an online tool that helps users find specific information on the internet by indexing and retrieving relevant web pages.
4. Business conducted through the internet includes e-commerce, online advertising, and various digital services.
5. Two search engines are Google and Bing.
6. Social media refers to online platforms that facilitate user-generated content and social interaction, allowing people to connect and share information.
7. Bandwidth is the maximum data transfer rate of a network, representing the capacity for transmitting data over a communication channel.
8. Email is an electronic communication method that allows users to send and receive messages and files over the internet.
9. A computer network is a set of interconnected computers that share resources and information.
10. Bounded media refers to communication channels with physical boundaries, such as cables.
11. Simplex mode is a communication mode in which data can only flow in one direction at a time.
12. Downloading is the process of transferring data from a remote server to a local device.
13. Uploading is the process of transferring data from a local device to a remote server.
14. A Network Interface Card (NIC) is a hardware component that enables a computer to connect to a network.
15. A computer network is a set of interconnected computers with goals including resource sharing, communication, and collaboration.
16. A client computer is a device that requests services or resources from a server computer, which provides those services.
17. A network protocol is a set of rules governing communication between devices on a network; examples include TCP/IP, HTTP, and FTP.
18. A peer-to-peer network is a decentralized network where all computers have equal status and can share resources directly.
19. LAN (Local Area Network) is a network confined to a small geographic area, while WAN (Wide Area Network) covers a larger geographical area; examples include a home network (LAN) and the internet (WAN).
20. Physical LAN topology refers to the physical arrangement of devices in a network, with a physical star topology featuring a central hub connecting to multiple devices.
21. Bounded media use physical channels for communication (e.g., cables), while unbounded media rely on wireless transmission (e.g., radio waves).
22. Radio wave transmission is a wireless communication method using electromagnetic waves, with advantages including mobility and no physical connections.
23. The Internet is a global network providing services like email, web browsing, and online collaboration.
24. Advantages of the internet include access to vast information, communication, online services, and e-commerce opportunities.
25. Five internet services are email, web browsing, online shopping, social media, and online streaming.
26. Electronic mail is a digital messaging system, and its advantages include speed, cost-effectiveness, and asynchronous communication.
27. Communication media encompasses the channels used for information transfer; bounded media have physical boundaries, while unbounded media do not.
28. Computer networks reduce operation costs by facilitating resource sharing, efficient communication, and centralized management.
Chapter 2: Ethical and Social Issues in ICT
1. What do you understand by digital citizen? What are the nine elements of digital citizenship?
2 What is a digital footprint? What are the two ways to create a digital footprint?
3. What is computer ethics? Write any two of them.
4 Why is ethics important in information technology?
5. Write any four commandments of computer ethics.
6. What is hacking?
7 What is the purpose of hacking?
8. Define digital citizenship?
9. What is a digital footprint?
10. Write some of the examples of digital footprint.
11. Define cyber bullying with any four examples
12. What is a social media? What is purpose of social media?
13. List any three major social media security threats
14. Briefly explain cyber law.
15. What is cybercrime?
16. Define IT Policy 2072 in short
17. What is Electronic Transaction Act?
18 Write any four opportunities and threats in social media.
1. Digital citizenship refers to the responsible and ethical use of technology, and the nine elements include digital access, digital commerce, digital communication, digital literacy, digital etiquette, digital law, digital rights and responsibilities, digital health, and digital security.
2. A digital footprint is the trail of data created by one's online activities, and two ways to create it are through actively posting content online and through passive data collection by websites and platforms.
3. Computer ethics involves the moral principles that govern the use of computers, and two examples include respecting privacy and avoiding unauthorized access.
4. Ethics is important in information technology to ensure responsible and fair use of technology, protect privacy, and prevent misuse of data.
5. Four commandments of computer ethics include not harming others with computer actions, not interfering with others' computer work, not using computers to steal, and respecting others' privacy.
6. Hacking is the act of gaining unauthorized access to computer systems or networks.
7. The purpose of hacking can vary, but it often involves exploring weaknesses in security, gaining unauthorized access, or promoting a cause.
8. Digital citizenship is the responsible use of technology to engage in society, participate in online communities, and contribute positively to the digital world.
9. A digital footprint is the trace of one's online activities, including information shared, posts, and interactions.
10. Examples of digital footprint include social media posts, online comments, website visits, and online purchases.
11. Cyberbullying is the use of technology to harass, intimidate, or harm others, and examples include spreading rumors, posting hurtful comments, sharing private information, and creating fake profiles.
12. Social media is online platforms that enable users to create and share content, and the purpose includes connecting with others, sharing information, and expressing oneself.
13. Major social media security threats include identity theft, phishing attacks, and account hijacking.
14. Cyber law encompasses legal principles governing the use of the internet and related technologies.
15. Cybercrime refers to criminal activities carried out using computers or the internet.
16. IT Policy 2072 is not defined in the provided information.
17. The Electronic Transaction Act is a legal framework that provides legal recognition to electronic transactions and digital signatures.
18. Opportunities in social media include communication and networking, while threats include cyberbullying, privacy concerns, misinformation, and security risks.
Chapter 3: Computer Security
1.What is computer security?
2. What are the security threats? Explain any two in brief.
3. What do you mean by malicious code? Name any two malicious code.
4.What are security mechanism and security services? 4
5 What is biometrics? What does biometrics use for user authentication?
6.What is firewall? Why is firewall important in network security?
7. What is the difference between encryption and decryption?
8 What is antivirus software? Give any two examples of antivirus software.
9. What is data backup? Why is important in computer security?
10 What is hardware security? List any three hardware security measures. 11. Why does a computer system need air-conditioned room?
12. Why does a computer system need dust free environment?
13. What is a power protection device? Give examples.
14. What is UPS? What are the functions of UPS?
15. What is the password? Why is password used in a computer?
16. Define Encryption and Decryption.
1. Computer security is the protection of computer systems, networks, and data from unauthorized access, attacks, and damage.
2. Security threats include malware (malicious software) and phishing; malware can compromise systems, while phishing aims to deceive users into revealing sensitive information.
3. Malicious code refers to software designed to harm a computer or its data; two examples are viruses and worms.
4. Security mechanisms are tools and techniques to enforce security policies, while security services are specific functionalities ensuring protection, such as authentication and encryption.
5. Biometrics is the use of unique physical or behavioral characteristics for user authentication, including fingerprints or facial recognition.
6. A firewall is a network security device that monitors and controls incoming and outgoing network traffic, crucial for preventing unauthorized access and ensuring network security.
7. Encryption is the process of converting plaintext into ciphertext, while decryption is the reverse process of converting ciphertext back to plaintext.
8. Antivirus software detects and removes malicious software; examples include Norton Antivirus and McAfee.
9. Data backup involves copying and storing data to prevent loss; it is crucial in computer security to recover information in case of data corruption or system failures.
10. Hardware security involves protecting physical components; three measures are biometric access controls, hardware tokens, and secure boot processes.
11. A computer system needs an air-conditioned room to regulate temperature and prevent overheating, ensuring optimal performance and longevity.
12. A dust-free environment is necessary to prevent dust accumulation that can damage internal components and affect a computer system's efficiency.
13. A power protection device safeguards against power fluctuations; examples include surge protectors and voltage regulators.
14. UPS (Uninterruptible Power Supply) provides backup power during outages, ensuring continuity of operations and protecting against data loss.
15. A password is a secret code or phrase used for user authentication in a computer, ensuring only authorized individuals access the system.
16. Encryption is the process of converting readable data into unreadable code, while decryption is the reverse process of converting encrypted code back to readable data.
Chapter 4: E-Commerce
1. Define E-Commerce.
2 What is the business done through the internet?
3. Mention the benefits and limitations of E-Commerce.
4 Explain the different types of E-Commerce.
5 What is M-Commerce? Give some examples.
6.What is Online Payment? Write the different forms of e-payment in Nepal.
7 What is the business done through internet?
1. E-Commerce is the buying and selling of goods and services over the internet.
2. The business done through the internet involves online transactions, marketing, and communication.
3. Benefits of E-Commerce include global reach, cost efficiency, and convenience, while limitations include security concerns and potential lack of personal interaction.
4. Different types of E-Commerce include B2C (Business to Consumer), B2B (Business to Business), C2C (Consumer to Consumer), and C2B (Consumer to Business).
5. M-Commerce refers to mobile commerce and involves conducting transactions through mobile devices; examples include mobile banking and in-app purchases.
6. Online payment is a digital transaction method, and in Nepal, e-payment forms include mobile wallets, bank transfers, credit/debit cards, and online banking.
7. The business done through the internet encompasses various activities such as online shopping, digital marketing, and e-services.
Chapter 5: Contemporary Technology
1. What are the advantages of cloud computing?
2 What are the types of cloud computing services?
3. List some areas where Al can help us and how?
4 How is Al software different from other software?
5. 6 How can public get benefited from the e-governance services? Provide some example of e-governance services that exist in Nepal?
7. What is loT? Write any two importance of it.
8. Give some examples of loT devices and their applications?
9. How do you think, loT devices can help in our day to day life?
10. What is cloud computing?
11. List any five characteristics of cloud computing.
12. List any three disadvantages of cloud computing.
13. Explain the three types of cloud computing.
14. What is Artificial Intelligence?
15. What is Virtual Reality?
16. What is E-governance? What are the benefits of E-governance?
17. Explain the different types of e-Government services.
18. What is mobile computing?
19. State the important advantages of mobile computing
1. The advantages of cloud computing include cost savings, scalability, flexibility, accessibility, and automatic updates.
2. Types of cloud computing services are Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (SaaS).
3. AI can help in areas such as healthcare diagnosis, autonomous vehicles, fraud detection in finance, personalized recommendations in marketing, and natural language processing for improved communication.
4. AI software is distinct as it can learn and adapt from data, making it capable of performing tasks without explicit programming, unlike traditional software.
5. The public can benefit from e-governance services through improved accessibility, transparency, efficiency, and citizen engagement in government processes.
6. Examples of e-governance services in Nepal include online tax filing, citizen portals for accessing government information, and electronic procurement systems.
7. IoT (Internet of Things) refers to interconnected devices sharing data; its importance lies in enhanced efficiency and data-driven decision-making.
8. Examples of IoT devices include smart thermostats for home automation and health monitoring wearables for applications in healthcare.
9. IoT devices can improve day-to-day life by providing smart home automation, healthcare monitoring, and efficient energy management.
10. Cloud computing is a technology that allows users to access and use computing resources (such as servers, storage, and applications) over the internet.
11. Characteristics of cloud computing include on-demand self-service, broad network access, resource pooling, rapid elasticity, and measured service.
12. Disadvantages of cloud computing include security concerns, dependency on internet connectivity, and potential for limited customization.
13. The three types of cloud computing are Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (SaaS).
14. Artificial Intelligence (AI) refers to the development of computer systems that can perform tasks requiring human intelligence, such as learning, reasoning, problem-solving, and perception.
15. Virtual Reality (VR) is a computer-generated simulation of a three-dimensional environment that can be interacted with in a seemingly real or physical way.
16. E-governance involves the use of information and communication technology to improve government efficiency, transparency, and citizen engagement; benefits include increased accessibility, efficiency, and reduced corruption.
17. Different types of e-Government services include G2C (Government-to-Citizen), G2B (Government-to-Business), G2G (Government-to-Government), and G2E (Government-to-Employee) services.
18. Mobile computing is the use of mobile devices (such as smartphones and tablets) to access and share information wirelessly.
19. Important advantages of mobile computing include increased mobility, real-time information access, improved communication, and enhanced productivity.
Chapter 7: Database Management System
1. What is database? Give some examples of database.
2 Differentiate between data and information.
3. What is DBMS? Name any four DBMS software.
4. What are the components of database?
5 List any four features of MS-Access.
6. What is a database? Give any two examples.
7.What is database object? List any four database objects.
8. What does data type? Name any four data types in MS-Access.
9. Which data type is used to store numeric characters or special symbols in MS-Access?
10. What is primary key? Why is it important to specify?
11. List any four advantages of primary key. 12 What are field properties? Name any four of them.
13. Define indexing. Mention its importance.
14 Which view is used to modify a table in MS-Access?
15. Explain data sorting. List any two advantages of using it.
16. What is query? List the different types of query.
17. What is the importance of Query in database?
18. Differentiate between Select query and Action query.
19. What is form? Mention its uses.
20. Explain the process to create form using wizard.
21. Why form is required in MS-Access?
22. What is the report?
23. Mention the importance of creating report in database.
24. List any two major differences between forms and reports.
25. Which is the logical data type of MS-Access?
26. Which data type is used to store alpha numeric characters or special symbols in MS-Access?
27 What is the default size of text field in MS-Access?
28. Which data type is suitable to store photographs of students in MS-Access?
29. What is the storage size of Long Text (memo) and text data type in MS-Access?
30. What is the storage size of Yes/No field?
31.Write any four objects of Ms Access
32.Define relationship
33 What is the Validation Rule in MS-Access?
34.What is the Validation Text?
35 Define MS Access.
36.Define field
37. Deline foreign key
1. A database is a structured collection of data, and examples include a customer database for a company and a library catalog.
2. Data are raw facts, while information is processed data that has meaning.
3. DBMS (Database Management System) is software that facilitates the creation, organization, and management of databases. Four examples are Oracle, MySQL, SQL Server, and PostgreSQL.
4. Components of a database include tables, relationships, queries, forms, reports, and more.
5. Four features of MS-Access are tables for data storage, forms for data input, queries for data retrieval, and reports for data presentation.
6. A database is a structured collection of data, and examples are an employee database and a product inventory database.
7. A database object is a defined element within a database, and four examples are tables, queries, forms, and reports.
8. Data type defines the kind of data that a field can store. Four data types in MS-Access are Text, Number, Date/Time, and Memo.
9. Memo data type in MS-Access is used to store alphanumeric characters or special symbols.
10. A primary key is a unique identifier for a record in a table, and it is important to ensure data integrity and facilitate record retrieval.
11. Four advantages of a primary key are uniqueness, data integrity, indexing, and efficient data retrieval.
12. Field properties in MS-Access define characteristics of a field. Four examples are Field Size, Format, Caption, and Default Value.
13. Indexing is the process of creating an index to improve the speed of data retrieval in a database, and it is important for efficient query performance.
14. Design View is used to modify a table in MS-Access.
15. Data sorting is arranging data in a specific order, and advantages include easier data analysis and quicker data retrieval.
16. A query is a request for specific information from a database. Different types include Select Query, Action Query, Parameter Query, and Crosstab Query.
17. Query is important in a database for extracting specific information, filtering data, and performing calculations.
18. Select query retrieves data, while an Action query performs an action on data, such as updating or deleting.
19. A form is a user interface that allows data input or display in a structured manner, used for data entry and viewing records.
20. The process to create a form using the wizard involves selecting a table or query, choosing fields, and specifying layout options.
21. A form is required in MS-Access for user-friendly data input, improved data accuracy, and enhanced data presentation.
22. A report is a formatted presentation of data from a database, used for summarizing and presenting information.
23. Creating reports in a database is important for data analysis, presentation, and sharing information.
24. Forms are used for data input, while reports are used for data presentation; forms are interactive, while reports are often for printing.
25. The logical data type of MS-Access is Yes/No.
26. Text data type in MS-Access is used to store alphanumeric characters or special symbols.
27. The default size of a text field in MS-Access is 255 characters.
28. OLE Object data type is suitable to store photographs of students in MS-Access.
29. The storage size of Long Text (memo) is up to 2 GB, while for Text data type, it depends on the field size specified.
30. The storage size of a Yes/No field is 1 bit.
31. Four objects of MS Access are tables, queries, forms, and reports.
32. Relationship in a database defines how tables are connected or related to each other.
33. Validation Rule in MS-Access defines criteria that must be met for data entered into a field.
34. Validation Text in MS-Access is a message that appears when data entered does not meet the Validation Rule.
35. MS Access is a relational database management system (RDBMS) developed by Microsoft, used for creating and managing databases.
36. In the context of a database management system (DBMS) with MS Access, a field is a fundamental component that represents a specific attribute or characteristic of data within a database table.
37. A foreign key in a DBMS with MS Access is a field that establishes a link between two tables by referencing the primary key of another table, ensuring referential integrity and enabling the creation of relationships between tables.
Chapter 10: Structured Programming in C
1. What is structured programming? Give any four examples of structured programming languages.
2. Write the advantages of structured programming.
3. Write the features of C language.
4. Define C language.
5. List the data types supported by 'C' language.
6. Explain the structure of the C program.
7. Differentiate between int and float data type in C.
8. Explain the different looping statements used in C.
9. Write the format specifier of basic data types of C language.
10. What is a header file? Give any two examples.
11. Write a program in C language to ask length, breadth and height and display volume of box.
12. Write C program to input three numbers and to print the smallest number.
13. Write a program in C language to calculate simple interest.
14. Write a program in C language that asks a number and check whether it is odd or even.
15. Write a C program that asks a number and check whether it is negative, positive or zero.
16. Write a program in C language to input a number then check whether the number is fully divisible by 10 or not.
17. Write a program in C language to input a number then check whether the number is divisible by 5 and 3 or not.
18. Write a program C language that asks any three numbers and displays the greatest among them.
19. Write a program in C language to display the series with their sum. 1, 2, 3, 4 up to 10th terms.
20. Write a program in C language to display first 10 odd numbers. 21. Write a C program to find the sum of first 10 natural numbers.
22. Write a program in C language to display the series 2, 4, 6, 8 up to 10th terms.
23. Write a program in C language to display the series 1, 1, 2, 3, 5, 8 up to 10th terms. 24. Write a program in C language to print series1, 8, 27, 64. ........... up to 10th terms.
25. Write a program in C language to display the below series: 5, 10, 15, 20, .... 50.
26. Write a program in C language to display the series; 100, 95, 90, 85 upto 10th term.
27. Write a program to print the numbers from 1 to 100 using while loop in C language.
1. Structured Programming:
- Structured programming is a programming paradigm that organizes code into clear, modular, and easy-to-understand structures.
- Examples of structured programming languages include C, Pascal, Ada, and Python.
2. Advantages of Structured Programming:
- Enhances code readability.
- Simplifies debugging and maintenance.
- Facilitates code reuse.
- Promotes the use of clear control structures.
3.. Features of C Language:
- Procedural programming.
- Low-level access to memory.
- Function-based structure.
- Portability across platforms.
4. . Define C Language:
- C is a high-level, procedural programming language known for its efficiency, flexibility, and portability. It was developed by Dennis Ritchie at Bell Labs in the 1970s.
5. Data Types in 'C' Language:
- int, float, double, char, short, long, etc.
6. Structure of a C Program:
- Typically consists of functions, variables, and statements.
- Starts with
main()
function.
7. Difference between int and float in C:
- int: Used for integer values (whole numbers).
- float: Used for floating-point values (decimal numbers).
8. Looping Statements in C:
- for: Executes a block of code a specific number of times.
- while: Repeats a block of code as long as a condition is true.
- do-while: Similar to while loop, but the code is executed at least once.
9. Format Specifiers in C:
- %d: for int
- %f: for float
- %c: for char
- %s: for string
10. Header File in C:
- A header file is a file containing declarations of functions, macros, and constants used in a program.
- Examples:
#include <stdio.h>
for standard input/output functions,#include <stdlib.h>
for standard library functions.
Chapter 9: QBasic File Handling Programming
1. Define Program File and Data File.
2. Explain the different modes used for opening the file.
3. What are "Read" and "Write" in data file?
4. Write a program to store records regarding the information of Book number, Book's name and 5. Writer's name in a sequential- data file called "Library.dat".
5. Write a program that asks students' name, roll and class and stores into "class.dat” only those records who are studying in class X. User can supply the records as per his/her need.
6.Write a program to ask students' name, class, and marks secured in three subjects. Store the data in a sequential data file "RESULT. DAT" along with the total marks. Make a provision to ask the user to enter another record.
7. A sequential data file "student.dat" contains few records under the fields Name, English, Nepali & Computer. Write a program to add few more records in the same sequential data file.
8. A sequential data file "SALARY.DAT" contains name, post and salary fields of information about display all the information of employee along with tax amount also (tax is 10% of salary) employees.
9. Write a program to read the data from "INFO.DAT" that contains student name, class, roll no. DOB and add data
10 Write a program to sequential data file "RECORD.DAT" to store employees' Name, Age, Gender and Salary.
11. Read information as name, address, roll and salary from "SALARY.DAT" file and display them.
12. A sequential data file "Resutl.dat" has several records having fields student's name and marks in English, Math and Computer. Write a program that reads all the records and displays only those records whose name starts with 'K' and also counts the total number of records stored in the file.
13. A sequential data file called "Employee.txt" has stored data under the field heading Roll No., Name, Gender, English, Nepali, Maths and Computer. Write a program to display all the information of those students whose gender is "F" and obtained marks in computer is more than 90.
14. A data file "office.dat" has stored records of few employees with EmpID, name, address, post and salary. Write a program to display all the records of the employee whose address is Tanahun and salary is more than 40,000.
1. Program File: It's where your main code is stored. Think of it like a recipe book for your computer program.
Data File: This is where you store information that your program uses or updates, like a shopping list.
2. File Opening Modes:
- Input mode: Read-only, like looking at the recipe without changing it.
- Output mode: Write-only, like writing a new recipe.
- Append mode: Add more to an existing file, like adding ingredients to a list.
3.Read and Write in Data File:
- Read: It's like checking the items on your shopping list - your program gets information from the file.
- Write: Similar to adding new items to your shopping list - your program puts information into the file.
Chapter 8: Modular Programming in Qbasic
1.What is Modular Programming?
2 What is Procedure? Mention its types
3 Write the difference between sub-procedure and function-procedure
4 Define main-module
5 Differentiate between local and global variable.
6 Write anyone QBASIC program to show the difference between call try reference and call by value
7. Write a program in QBASIC that asks length, breadth of a room and calculate its area and perimeter. Create a user defined function to calculate area and sub program to calculate perimeter. [Hint: [Area=LxB], [p=2(L+B)]
8. Write a program in QBASIC that will asks the user to input length, breadth and height of a room then use SUB procedure calculate its volume and FUNCTION procedure to calculate its area of four walls.
9. Write Qbasic program to find average of three numbers by using FUNCTION. END FUNCTION and find greatest number by using SUB procedure.
10.Write a program to calculate Area of circle using Function procedure and use SUB procedure to calculate as circumference in Q-Basic. (Hint: [Ar2], [C=2]
11.Write a program in QBASIC that ask the radius of circle. Write a program to calculate the area and circumference of a circle Create a user defined function first (r) to calculate area and sub procedure second (r) to calculate circumference of a circle.
12.Write a program in QBASIC that asks length, breadth and height of room and calculate its area and volume. Create a user defined function to calculate area and sub-program to calculate volume. (Hint: [A-L-B], [V=LxBxH]
13.Write a program in OBASIC that will asks the user to input length, breadth and height. Create a user defined function to calculate surface area of four walls and write sub program to calculate surface area of box [Hint: surface area of for walls-2H(L+B), surface area of box=Ih+bh+lb
14.Write a program in QBASIC that allows user to enter radius of a circle. Create a user define function to find the area of circle and sub procedure to find volume of a cylinder. Hint: [A= r2 v=xr2hj
15.Write a program to define a function procedure to display area of sphere and sub procedure to display volume of sphere where user has to input the required data in the main module. [Hint: Area of sphere: 4*PI*R^2, Volume-V=4/3
16.Write a program in QBASIC that asks two numbers to find square of two numbers using SUB procedure and sum of two numbers using FUNCTION procedure.
- 1. Modular Programming:Modular programming is a coding approach where a program is divided into small, independent, and manageable modules or units. Each module performs a specific task and can be developed and tested independently, promoting code reusability and maintainability.
- 2. Procedure:A procedure is a set of instructions or a block of code designed to perform a specific task. Types of procedures include:
- Built-in Procedures: Predefined functions provided by the programming language.
- User-Defined Procedures: Created by the programmer to perform custom tasks.
3.Sub-Procedure vs. Function-Procedure:
- Sub-Procedure: Also known as a subroutine or void function, it performs a task but doesn't return a value.
- Function-Procedure: Returns a value after performing a specific task.
- 4.Main-Module:The main module is the central part of a program. It contains the main function where the execution of the program begins. It often calls other modules to perform specific tasks.
5. Local vs. Global Variable:
- Local Variable: Declared and used within a specific function or block, not accessible outside that scope.
- Global Variable: Declared outside any function, accessible throughout the program.
- 6.Call by ReferenceFUNCTION AddNumbers(ByRef a, ByRef b)a = a + 5b = b + 5END FUNCTION' Call by Value FUNCTION SubtractNumbers(ByVal x, ByVal y) x = x - 3 y = y - 3 END FUNCTION ' Main Program DIM num1, num2 num1 = 10 num2 = 7 ' Call by Reference CALL AddNumbers(num1, num2) ' num1 and num2 will be modified ' Call by Value CALL SubtractNumbers(num1, num2)' num1 and num2 will remain unchanged