Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Q-1: Compiler vs Interpreter

Compiler:

- Translates entire program into machine code before execution


- Generates an executable file
- Examples: C, C++, Java (compiled to bytecode)

Interpreter:

- Translates program line by line into machine code during execution


- No executable file generated
- Examples: Python, JavaScript (in web browsers), Ruby

Q-2: Important Features of Database Management Systems (DBMS)

- Data Definition: Define database structure and relationships


- Data Manipulation: Insert, update, and delete data
- Data Retrieval: Query and retrieve specific data
- Data Security: Control access and ensure data integrity
- Data Backup and Recovery: Regular backups and restore data in case of failure
- Performance Optimization: Improve query efficiency and database performance
- Scalability: Support growing amounts of data and users

Q-3: Short Notes

i. GIS (Geographic Information System): A computer-based tool for capturing, storing, analyzing, and displaying
geographically referenced data. It helps in mapping, spatial analysis, and decision-making.

ii. Wi-Fi: A wireless networking technology that allows devices to connect to the internet or communicate with
each other without cables. It uses radio waves to transmit data between devices.

iii. Protection from Virus: A computer virus is a malware that replicates itself and can harm the system.
Protection measures include:

- Installing antivirus software


- Avoiding suspicious downloads and emails
- Keeping software up-to-date
- Using strong passwords and firewalls
Q-4: Domain Name System (DNS)

DNS is a decentralized naming system that translates human-readable domain names into IP addresses that
computers can understand.

How it works:

1. User enters a URL in their browser


2. Browser sends the request to a DNS resolver
3. DNS resolver sends the request to a DNS server
4. DNS server looks up the IP address associated with the domain name
5. DNS server returns the IP address to the DNS resolver
6. DNS resolver returns the IP address to the browser
7. Browser connects to the server with the IP address

Diagram:

[User] --> [Browser] --> [DNS Resolver] --> [DNS Server] --> [IP Address] --> [Server]

Q-5: OSI Model

The OSI (Open Systems Interconnection) model is a 7-layered framework for designing and implementing
computer networks.

Layers:

1. Physical (Layer 1)
2. Data Link (Layer 2)
3. Network (Layer 3)
4. Transport (Layer 4)
5. Session (Layer 5)
6. Presentation (Layer 6)
7. Application (Layer 7)

Diagram:

[Application] --> [Presentation] --> [Session] --> [Transport] --> [Network] --> [Data Link] --> [Physical]
Q-6: Program to Convert Celsius to Fahrenheit

Algorithm:

1. Take input temperature in Celsius (C)


2. Calculate Fahrenheit (F) using the formula: F = (C * 9/5) + 32
3. Display the result

Program (in Python):

C = float(input("Enter temperature in Celsius: "))


F = (C * 9/5) + 32
print("Temperature in Fahrenheit:", F)

Q-7: Program to Find the Largest of Three Numbers

Algorithm:

1. Take input three numbers (A, B, C)


2. Compare A and B, and store the larger value in a variable (MAX)
3. Compare MAX and C, and store the larger value in MAX
4. Display the largest number (MAX)

Program (in Python):

A = int(input("Enter first number: "))


B = int(input("Enter second number: "))
C = int(input("Enter third number: "))

MAX = A if A > B else B


MAX = MAX if MAX > C else C

print("Largest number:", MAX)

You might also like