Study resource

Read at your pace, then save it for later.

Year 2025 - IDC 201 - Computer Science

Unit - 1

1. Answer any four of the following: (1x4=4)

(a) Define IP address. [1 Mark]

Answer: An IP (Internet Protocol) address is a unique numerical identifier assigned to each device connected to a computer network that uses the Internet Protocol for communication.

(b) What is a home page? [1 Mark]

Answer: A home page is the main introductory web page of a website that serves as the primary starting point and central navigation center for site visitors.

(c) What is DNS? [1 Mark]

Answer: DNS (Domain Name System) is a hierarchical decentralized system that translates human-readable domain names (such as www.example.com) into IP addresses.

(d) What is the full form of HTTPS? [1 Mark]

Answer: The full form of HTTPS is Hypertext Transfer Protocol Secure.

(e) What is a web server? [1 Mark]

Answer: A web server is a computer system (hardware and software) that stores web site content and serves web pages to client devices over the network via HTTP/HTTPS protocols.

2. Answer any one of the following questions: (2)

(a) Write down the difference between HTTP request and HTTP response. [2 Marks]

Answer:

FeatureHTTP RequestHTTP Response
OriginSent by the client (web browser) to request web data.Sent by the server back to the client.
ContentsIncludes request method (GET/POST), URL, and client headers.Includes status code (e.g., 200 OK, 404 Not Found) and requested resource content.

(b) Explain the term 'domain registration'. [2 Marks]

Answer: Domain registration is the process of reserving and securing a unique domain name (such as example.com) on the Internet for a specific time period through an accredited domain registrar. Once registered, the domain owner holds exclusive rights to use that domain for their web services until expiration.

3. Answer any one of the following questions: (8)

(a) (i) Explain the basics of the Internet and the World Wide Web. Highlight their relationship. [4 Marks]

Answer:

Basics of the Internet

The Internet is a global system of interconnected computer networks that communicate using standard internet protocols (TCP/IP). It forms the physical infrastructure connecting millions of private, public, academic, commercial, and government devices worldwide, supporting services like email, file transfers, and web traffic.

Basics of the World Wide Web (WWW)

The World Wide Web is an information system operating over the Internet. It consists of interlinked digital documents, web pages, and multimedia resources accessible using Uniform Resource Locators (URLs) and transferred using protocols such as HTTP and HTTPS.

Relationship between Internet and WWW

  • Infrastructure vs. Service: The Internet is the underlying physical network infrastructure (the highway network), whereas the WWW is an application service that operates on top of this network (the vehicles traveling on it).
  • Dependency: The World Wide Web depends on the Internet to function, but the Internet supports many other services independent of the WWW, such as FTP, Email (SMTP), and VoIP.

(a) (ii) Discuss the differences among Static, Dynamic and Active web-pages with examples. [4 Marks]

Answer:

Web Page Classification

PropertyStatic Web PageDynamic Web PageActive Web Page
DefinitionDelivers identical pre-stored HTML content to every client.Generates dynamic content on the server side based on user inputs/data.Runs interactive client-side scripts continuously within the browser environment.
ProcessingNo server-side scripting executed; simple HTML/CSS.Server scripts (PHP, Node.js, Python) run before sending response.Client-side scripts (JavaScript, WebAssembly) execute live in browser.
ContentFixed content across all user visits.Personalized content per user session or data query.Real-time interactive components (e.g., interactive canvas, web tools).
ExampleAn online static resume or company privacy policy.An e-commerce user dashboard or search engine results page.Google Maps, browser games, interactive web photo editors.

(b) (i) Write a detailed note on URL and its different parts with suitable examples. [4 Marks]

Answer:

Uniform Resource Locator (URL)

A URL is a web address that specifies the location of a resource on the Internet along with the protocol used to retrieve it.

Components of a URL

Consider the complete URL example: https://www.example.com:443/products/items.html?category=tech#details

  • Scheme / Protocol: https:// – Defines the rule or protocol used for data communication.
  • Host / Domain Name: www.example.com – Specifies the IP domain address of the host server.
  • Port: :443 – Indicates the network port on the server (443 for default HTTPS).
  • Path: /products/items.html – Specifies the directory path and target document on the web server.
  • Query String: ?category=tech – Supplies parameters to the server using key-value pairs following a ? mark.
  • Fragment / Anchor: #details – Points to a specific bookmark section within the web page following a # mark.

(b) (ii) What are web browsers? Explain their main functions and applications. [4 Marks]

Answer:

Web Browsers

A web browser is a client-side software application designed to fetch, render, and navigate resources across the World Wide Web. Examples include Google Chrome, Mozilla Firefox, Microsoft Edge, and Safari.

Main Functions of Web Browsers

  • Fetching Content: Sends HTTP/HTTPS requests to servers and receives HTML documents, styles, images, and scripts.
  • HTML Parsing & Rendering: Converts raw HTML/CSS code into a visually structured interface using rendering engines.
  • JavaScript Execution: Runs client-side dynamic logic using built-in JavaScript engines (e.g., V8 engine).
  • Security & Privacy: Validates digital security certificates, enforces HTTPS protocols, manages cookies, and blocks malicious web threats.

Applications

  • Accessing online web applications, educational portals, internet banking, and e-commerce platforms.
  • Navigating global web content using tab management, bookmarks, and search features.

Unit - 2

4. Answer any four of the following questions: (1x4=4)

(a) What is an attribute in HTML? [1 Mark]

Answer: An attribute provides extra configuration information or properties to an HTML element, placed inside the opening tag as a name="value" pair.

(b) Write the syntax of an open tag with an example. [1 Mark]

Answer: Syntax: <tagname>. Example: <p> for opening a paragraph element.

(c) Name the tag used to insert a line break. [1 Mark]

Answer: The <br> tag is used to insert a line break in HTML.

(d) What is the purpose of the <title> tag? [1 Mark]

Answer: The <title> tag specifies the document title shown in the web browser's tab and search engine results.

(e) What does the <p> tag do? [1 Mark]

Answer: The <p> tag defines a text paragraph in HTML, automatically adding vertical margin spacing around the paragraph block.

5. Answer any one of the following questions: (2)

(a) Explain the difference between relative URL and absolute URL. [2 Marks]

Answer:

FeatureAbsolute URLRelative URL
DefinitionContains the complete web path including protocol and domain name.Points to a file relative to the current file location on the server.
Examplehttps://www.example.com/images/pic.pngimages/pic.png or ../about.html

(b) Mention two text formatting tags with example. [2 Marks]

Answer:

  1. <strong>: Renders text in bold font to highlight strong importance. Example: <strong>Important</strong>
  2. <em>: Displays text in italic style for emphasis. Example: <em>Note</em>

6. Answer any one of the following questions: (8)

(a) (i) Explain in detail the use of lists in HTML. Write an HTML code to display ordered, unordered and definition lists. [4 Marks]

Answer:

Use of Lists in HTML

Lists in HTML group related items together, establishing structured hierarchy, improving readability, and making navigation intuitive.

  • Unordered List (<ul>): Bulleted list format for unordered content.
  • Ordered List (<ol>): Numbered or lettered sequence list format.
  • Definition/Description List (<dl>): Displays term pairs (<dt>) along with their corresponding explanations (<dd>).

HTML Code Example

<!-- Unordered List -->
<ul>
  <li>HTML</li>
  <li>CSS</li>
</ul>

<!-- Ordered List -->
<ol>
  <li>Step 1</li>
  <li>Step 2</li>
</ol>

<!-- Definition List -->
<dl>
  <dt>HTML</dt>
  <dd>HyperText Markup Language</dd>
</dl>

(a) (ii) Write an HTML program to demonstrate the use of different text styles and arrangement. [4 Marks]

Answer:

<!DOCTYPE html>
<html>
<head>
    <title>Text Styles and Layout</title>
</head>
<body>
    <h1>Main Document Heading</h1>
    <p>This sentence includes <strong>bold text</strong> and <em>italicized text</em>.</p>
    <p>Chemical formula: H<sub>2</sub>O and math power: X<sup>2</sup>.</p>
    <p>This paragraph shows <mark>highlighted text</mark> and <del>struck-through text</del>.</p>
    <hr />
    <p style="text-align: center;">Centered text alignment block.</p>
</body>
</html>

(b) (i) Write an HTML code to create a table with rows, columns and merged cells (rowspan and colspan). [4 Marks]

Answer:

<!DOCTYPE html>
<html>
<head>
    <title>HTML Merged Table</title>
</head>
<body>
    <table border="1">
        <tr>
            <th rowspan="2">Student Name</th>
            <th colspan="2">Marks</th>
        </tr>
        <tr>
            <th>Theory</th>
            <th>Practical</th>
        </tr>
        <tr>
            <td>John Doe</td>
            <td>88</td>
            <td>92</td>
        </tr>
    </table>
</body>
</html>

(b) (ii) Explain the use of form in HTML. Write HTML program to create a form with textbox and submit button. [4 Marks]

Answer:

Use of HTML Forms

HTML forms are used to gather user input data on a web page and submit it to a web server for further processing (such as logging in, searching, or registering).

HTML Code Example

<!DOCTYPE html>
<html>
<head>
    <title>Basic HTML Form</title>
</head>
<body>
    <h2>User Information Form</h2>
    <form action="/submit_form" method="POST">
        <label for="username">Enter Username:</label>
        <input type="text" id="username" name="username" required />
        <br /><br />
        <input type="submit" value="Submit" />
    </form>
</body>
</html>

Unit - 3

7. Answer any four of the following questions: (1x4=4)

(a) What does JavaScript mainly do in webpage? [1 Mark]

Answer: JavaScript mainly adds interactivity, behavioral logic, dynamic rendering, and client-side data handling to web pages.

(b) Write the syntax for declaring a variable in JavaScript. [1 Mark]

Answer: Syntax: let variableName = value; or const variableName = value;.

(c) Name any two conditional statements used in JavaScript. [1 Mark]

Answer: Two conditional statements are the if...else statement and the switch statement.

(d) Write one feature of DHTML. [1 Mark]

Answer: DHTML enables web pages to dynamically change content, layout, and style properties in real time without requiring a full page refresh.

(e) What is the difference between '==' and '===' in JavaScript? [1 Mark]

Answer: == checks equality with type coercion, whereas === performs strict equality checking on both value and data type without coercion.

8. Answer any one of the following questions: (2)

(a) Differentiate between client-side scripting and server-side scripting. [2 Marks]

Answer:

FeatureClient-Side ScriptingServer-Side Scripting
ExecutionRuns locally within the client browser (e.g., JavaScript).Runs on the remote host web server (e.g., PHP, Node.js).
PurposeEnhances UI layout, handles user events, and input validation.Processes business logic, queries databases, and generates HTML.

(b) What are events in JavaScript? Give examples of two commonly used events. [2 Marks]

Answer: Events are actions or occurrences that happen in the browser (such as user interactions or system notifications) that JavaScript code can monitor and respond to.

  • onclick: Fires when a user clicks on an HTML element.
  • onsubmit: Fires when a user submits a web form.

9. Answer any one of the following questions: (8)

(a) Explain the different types of loops in JavaScript with syntax and examples. [8 Marks]

Answer:

Overview of JavaScript Loops

Loops execute a block of code repeatedly while a specified logical condition remains true. They automate repetitive programming tasks efficienty.

1. For Loop

Used when the number of iterations is predetermined.

Syntax:

for (initialization; condition; increment) {
    // Code block to execute
}

Example:

for (let i = 1; i <= 3; i++) {
    console.log("Iteration: " + i);
}

2. While Loop

Evaluates the specified condition first and loops as long as the condition remains true.

Syntax:

while (condition) {
    // Code block to execute
}

Example:

let i = 1;
while (i <= 3) {
    console.log("Count: " + i);
    i++;
}

3. Do-While Loop

Executes the code block once prior to evaluating the condition, guaranteeing at least one execution.

Syntax:

do {
    // Code block to execute
} while (condition);

Example:

let i = 1;
do {
    console.log("Value: " + i);
    i++;
} while (i <= 3);

4. For-In Loop

Iterates over all enumerable key properties of an object.

Syntax: for (let key in object) { ... }

Example:

const user = { name: "Alice", role: "Admin" };
for (let key in user) {
    console.log(key + ": " + user[key]);
}

5. For-Of Loop

Iterates directly over iterable elements (such as Arrays or Strings).

Syntax: for (let value of iterable) { ... }

Example:

const items = ["HTML", "CSS", "JS"];
for (let item of items) {
    console.log(item);
}

(b) Compare and contrast HTML, JavaScript and DHTML in terms of purpose and usage in web development. [8 Marks]

Answer:

Introduction

Web development incorporates markup, scripting, and integrative techniques. HTML structures content, JavaScript provides behavioral control, and DHTML integrates these components for dynamic presentation.

Comparison Matrix

0

Detailed Usage

  • HTML (HyperText Markup Language): Acts as the building structural foundation of web pages. It defines elements like structural headings, body text, image tags, and link anchors.
  • JavaScript: Acts as the dynamic behavioral engine. It enables logical operations, calculates variables, fetches external data asynchronously (AJAX), and handles events.
  • DHTML (Dynamic HTML): Is not a distinct programming language but an umbrella term for integrating standard HTML, CSS, JavaScript, and the Document Object Model (DOM) to craft interactive, animated user interfaces.

Conclusion

HTML builds web content structure, JavaScript adds functional code execution, and DHTML combines them to deliver seamless dynamic user experiences.

Unit - 4

10. Answer any four of the following questions: (1x4=4)

(a) Define cyber law. [1 Mark]

Answer: Cyber law is the legal framework governing electronic data, internet usage, software, security systems, and digital communication activities.

(b) What is cybercrime? [1 Mark]

Answer: Cybercrime is any unlawful act or offense committed using computers, digital devices, or computer networks as a tool or target.

(c) What is meant by cyber criminology? [1 Mark]

Answer: Cyber criminology is the interdisciplinary study of criminology, victimology, behaviors, and patterns of computer-mediated illegal activities.

(d) Define cybersecurity. [1 Mark]

Answer: Cybersecurity is the field of practice dedicated to safeguarding networks, computer hardware, applications, and digital data against cyberattacks or unauthorized access.

(e) Define 'threat' in the context of cybersecurity. [1 Mark]

Answer: A cybersecurity threat is any potential circumstance or malicious event that can exploit system vulnerabilities to cause data loss or system disruption.

11. Answer any one of the following questions: (2)

(a) Write short notes on phishing and malware. [2 Marks]

Answer:

  • Phishing: A fraudulent social engineering technique where attackers trick individuals into surrendering confidential data via deceptive communication.
  • Malware: Malicious software programs designed specifically to infiltrate, corrupt, or damage computer systems without user authorization.

(b) What are the major domains of cybersecurity? [2 Marks]

Answer: Major cybersecurity domains include Network Security, Application Security, Information/Data Security, Cloud Security, and Incident Response Management.

12. Answer any one of the following: (8)

(a) Discuss the importance of cyber law. Explain with examples, how cyber law helps in regulating cybercrimes. [8 Marks]

Answer:

Importance of Cyber Law

With global reliance on digital infrastructure, online finance, and electronic communication, cyber law is essential for maintaining order in cyberspace. Its primary benefits include:

  • Providing legal recognition for electronic documents and online contracts.
  • Deterring digital criminals through defined penalties and prosecution frameworks.
  • Protecting consumer privacy, personal information, and intellectual assets online.
  • Establishing guidelines for digital forensics and admissibility of digital evidence in courtrooms.

How Cyber Law Regulates Cybercrimes (With Examples)

  1. Penalizing Unauthorized Access: Laws penalize unauthorized server hacking and data breaches. For instance, Section 66 of India's IT Act establishes imprisonment for unauthorized hacking.
  2. Deterring Online Identity Fraud: Cyber laws prohibit identity theft and fake online personas. Section 66C and 66D penalize identity theft and impersonation using digital devices.
  3. Preventing Financial Fraud: Cyber laws enforce security compliance standards for e-banking and penalize online monetary scams.
  4. Protecting Intellectual Property: Prevents unauthorized digital piracy, software infringement, and illegal asset usage online.

Conclusion

Cyber law serves as an indispensable legal backbone for securing digital commerce and maintaining legal rights in cyberspace.

(b) Explain cyberattacks in detail. Discuss the various types of cyberattacks with examples. [8 Marks]

Answer:

Definition of Cyberattacks

A cyberattack is an offensive maneuver directed by malicious actors against computers, networks, or digital systems to disable them, steal sensitive information, or disrupt operations.

Major Types of Cyberattacks

  1. Malware Attacks: Involves deploying malicious scripts such as ransomware or trojans. Example: WannaCry ransomware locked global workstation files demanding digital ransom.
  2. Phishing Attacks: Deceptive electronic messages designed to deceive targets into revealing access credentials. Example: Spoofed bank notification emails directing users to malicious login pages.
  3. Denial of Service (DoS/DDoS): Overwhelms web infrastructure using high traffic volume to cause service outages. Example: Botnets flooding target servers during key online events.
  4. Man-in-the-Middle (MitM): Attackers secretly intercept communications between two target parties on insecure networks. Example: Intercepting unencrypted traffic over public Wi-Fi hotspots.
  5. SQL Injection (SQLi): Inserts malicious SQL syntax into user input fields to corrupt backend database execution.

Conclusion

Understanding diverse cyberattack vectors enables organizations to deploy strong defenses like firewalls, multi-factor authentication, and security updates.

Unit - 5

13. Answer any four of the following: (1x4=4)

(a) Write one example of spoofing. [1 Mark]

Answer: IP address spoofing (altering packet source addresses) or Email sender spoofing.

(b) What do you mean by data masking? [1 Mark]

Answer: Data masking is the technique of concealing sensitive real data by creating a realistic structural proxy version for testing environments.

(c) Define cryptanalysis. [1 Mark]

Answer: Cryptanalysis is the science of analyzing and deciphering encrypted codes or ciphers without requiring the secret key.

(d) What is cyber warfare? [1 Mark]

Answer: Cyber warfare involves state-sponsored cyberattacks conducted to breach or sabotage another nation's information networks and key infrastructure.

(e) What is a strong password? [1 Mark]

Answer: A strong password is a long, complex string of uppercase letters, lowercase letters, numbers, and symbols that is resistant to guessing attacks.

14. Answer any one of the following: (2)

(a) Briefly explain the concept of malicious software with two examples. [2 Marks]

Answer: Malicious software refers to computer code specifically crafted to disrupt system operation, collect private data, or perform unauthorized actions. Examples include:

  1. Spyware: Secretly tracks user behavior and records passwords.
  2. Ransomware: Encrypts file data and demands payment for key recovery.

(b) List any two tools/techniques of attackers for gathering information. [2 Marks]

Answer:

  1. Port Scanning (e.g., Nmap): Discovers open system ports and active network services.
  2. Open Source Intelligence (OSINT): Gathers public domain data via social search tools.

15. Answer any one of the following questions: (8)

(a) "The IT Act, 2008 plays a vital role in combating cybercrimes in India." Justify this statement with examples of cybercrime cases. [8 Marks]

Answer:

Introduction

The Information Technology (Amendment) Act, 2008 significantly modernized India's original IT Act of 2000 to combat expanding digital crimes. It updated laws to govern electronic transactions, cybersecurity threats, and data privacy protection.

Key Provisions under IT Act 2008

  • Section 43A: Requires entities to pay compensation for negligence in handling sensitive user data.
  • Section 66C: Imposes criminal penalties for identity theft and password misuse.
  • Section 66D: Penalizes online cheating through impersonation.
  • Section 66E: Criminalizes unauthorized privacy violations through non-consensual image distribution.
  • Section 66F: Covers prosecution and strict imprisonment for cyber terrorism acts.

Application and Case Justifications

  1. Banking Fraud Cases: Application of Section 66C/66D enables prosecution of phone phishing syndicates and card cloning operators.
  2. Privacy Violations: Enforcement under Section 66E offers legal protection against cyber stalking and online identity theft.
  3. Corporate Data Protection: Section 43A holds commercial platforms liable for implementing reasonable security controls.

Conclusion

The IT Act 2008 provides essential judicial backing to investigate, prosecute, and curb cybercrime effectively in India.

(b) Compare strong and weak passwords. Discuss the role of password management in cybersecurity. [8 Marks]

Answer:

Strong vs. Weak Passwords Comparison

AspectHTMLJavaScriptDHTML
DefinitionStandard markup language for web document structure.High-level programming scripting language.
An integrated web approach (HTML + CSS + DOM + JS).
Primary FunctionCreates layout, headings, forms, links, and content.Provides client-side dynamic logic and event handling.Dynamically updates style and structural elements post-load.
ExecutionParsed and rendered by browser engine.Interpreted by browser JavaScript engine.Executes dynamic DOM manipulation in real time.
InteractivityStatic document interaction (clicking static links).High programmatic interactive logic capability.Dynamic UI changes without reloading the web page.
FeatureStrong PasswordWeak Password
LengthMinimum 12 to 16 characters.Fewer than 8 characters.
Character MixCombines uppercase, lowercase, numbers, and symbols.Simple dictionary words, sequential numbers (12345), or simple names.
Security LevelResistant to brute-force and dictionary attacks.Cracked easily in seconds by automated tools.
ReuseUnique across every account.Reused across multiple web services.
ExampleX#8k$W9!pL2@qRpassword123

Role of Password Management in Cybersecurity

Managing credentials securely is central to protecting online identities. Password management tools help maintain robust access controls by:

  • Secure Encryption: Storing user passwords inside encrypted digital vaults accessible via a single master password.
  • Automated Complex Password Generation: Creating random, high-entropy unique passwords for every site.
  • Phishing Prevention: Auto-filling saved credentials only on verified web domains.
  • Multi-Factor Integration: Supporting MFA integration for strong defense-in-depth protection.

Conclusion

Using unique, strong passwords paired with secure password managers greatly lowers risk exposure against credential attacks.


xxx

Did this help you understand better?

Your feedback improves the quality of this resource for everyone.