0% found this document useful (0 votes)
6 views

COMPUTER

The document outlines the evolution of computers from the first to the fifth generation, detailing key characteristics and examples of each. It also covers the functional components of a computer system, the concept of booting, types of software, and the role of operating systems. Additionally, it includes programming concepts in C++, including data types, control structures, and user-defined functions.

Uploaded by

roughuse161
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

COMPUTER

The document outlines the evolution of computers from the first to the fifth generation, detailing key characteristics and examples of each. It also covers the functional components of a computer system, the concept of booting, types of software, and the role of operating systems. Additionally, it includes programming concepts in C++, including data types, control structures, and user-defined functions.

Uploaded by

roughuse161
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Unit 1: Computer Fundamentals

Evolution of Computers

Question 1: Briefly explain the evolution of computers from the first generation to the fifth
generation.
Answer:
The evolution of computers is categorized into five generations:

 First Generation (1940-1956): Used vacuum tubes, large in size, expensive, and consumed
high power. Examples: ENIAC, UNIVAC.

 Second Generation (1956-1963): Used transistors, smaller, faster, and more reliable.
Examples: IBM 1401, PDP-1.

 Third Generation (1964-1971): Used integrated circuits (ICs), reducing size and cost while
improving speed. Examples: IBM 360, PDP-8.

 Fourth Generation (1971-Present): Introduced microprocessors, enabling personal


computers. Examples: Apple II, IBM PC.

 Fifth Generation (Present and Beyond): Focuses on artificial intelligence, parallel processing,
and quantum computing. Examples: IBM Watson, quantum computers.

Basics of Computer System and Its Operation: Functional Components and Their Inter-connections

Question 2: What are the functional components of a computer system and how are they
interconnected?
Answer:
The functional components of a computer system are:

1. Input Unit: Devices like keyboards and mice for data entry.

2. Central Processing Unit (CPU): Includes the Arithmetic Logic Unit (ALU) for calculations and
the Control Unit (CU) for managing operations.

3. Memory Unit: Primary memory (RAM, ROM) for temporary storage and secondary memory
(HDD, SSD) for permanent storage.

4. Output Unit: Devices like monitors and printers for displaying results.
These components are interconnected via buses (data bus, address bus, control bus) that
transfer data, addresses, and control signals between them.

Concept of Booting

Question 3: Explain the concept of booting in a computer system.


Answer:
Booting is the process of starting a computer by loading the operating system from secondary
storage into RAM. It has two types:

 Cold Boot: Starting from a powered-off state.


 Warm Boot: Restarting without powering off.
The process begins with the BIOS performing a Power-On Self-Test (POST) to check hardware,
followed by loading the operating system.

Software Concepts: Types of Software

Question 4: Differentiate between system software, utility software, and application software.
Answer:

 System Software: Manages hardware and provides a platform for other software. Examples:
Operating systems, compilers.

 Utility Software: Maintains and optimizes the system. Examples: Antivirus, disk cleanup
tools.

 Application Software: Performs specific user tasks. Examples: Word processors, web
browsers.

System Software: Operating System, Compiler, Interpreter, and Assembler

Question 5: What is the role of an operating system in a computer?


Answer:
The operating system (OS) manages resources and provides a user interface. Its functions include:

 Processor Management: Allocates CPU time to processes.

 Memory Management: Manages memory allocation to programs.

 File Management: Handles file organization on storage devices.

 Device Management: Controls hardware devices.

Question 6: Explain the difference between a compiler and an interpreter.


Answer:

 Compiler: Translates the entire source code into machine code at once, creating an
executable file. Errors are reported after compilation.

 Interpreter: Translates and executes code line by line, reporting errors as they occur.

Operating System: Need, Functions, Types, and Commonly Used Operating Systems

Question 7: Why do we need an operating system?


Answer:
An operating system is needed to:

 Efficiently manage hardware resources.

 Provide a user-friendly interface.

 Enable multitasking and resource sharing.


 Ensure security and access control.

 Facilitate hardware-software communication.

Question 8: What are the different types of operating systems?


Answer:

 Interactive (GUI-based): Features graphical interfaces (e.g., Windows, macOS).

 Real-Time: For time-critical tasks (e.g., medical devices).

 Distributed: Manages multiple computers as a single system (e.g., Google’s systems).

Question 9: Name some commonly used operating systems.


Answer:

 Desktop: UNIX, LINUX, Windows, Solaris, BOSS.

 Mobile: Android, Symbian.

Illustration and Practice Using an Operating System

Question 10: Using Windows OS, explain how to create a folder, rename it, and delete it.
Answer:

1. Create a Folder:

o Right-click on the desktop or in File Explorer.

o Select "New" > "Folder."

o Type a name and press Enter.

2. Rename a Folder:

o Right-click the folder.

o Select "Rename."

o Type a new name and press Enter.

3. Delete a Folder:

o Right-click the folder.

o Select "Delete."

o Confirm deletion.

Utility Software

Question 11: What is the purpose of antivirus software?


Answer:
Antivirus software detects, prevents, and removes malware (e.g., viruses, worms, trojans) to protect
the system from security threats.
Question 12: Explain the function of a disk defragmenter.
Answer:
A disk defragmenter reorganizes fragmented data on a hard disk, improving access speed by
consolidating files into contiguous blocks.

Application Software

Question 13: What are the main features of a word processor?


Answer:

 Text editing and formatting.

 Spell and grammar checking.

 Insertion of images, tables, and charts.

 Page layout and printing options.

Question 14: Give an example of domain-specific application software and its use.
Answer:

 Example: Hotel Management System.

 Use: Manages room bookings, guest check-in/check-out, billing, and inventory.

Number System

Question 15: Convert the decimal number 25 to binary, octal, and hexadecimal.
Answer:

 Binary: 11001

 Octal: 31

 Hexadecimal: 19

Question 16: Convert the binary number 101101 to decimal.


Answer:
45

Internal Storage Encoding of Characters

Question 17: What is ASCII and how many bits are used in standard ASCII?
Answer:
ASCII (American Standard Code for Information Interchange) is a character encoding standard using 7
bits to represent 128 characters (letters, digits, symbols).

Question 18: What is the advantage of UNICODE over ASCII?


Answer:
UNICODE supports a vast character set for multiple languages and scripts, ideal for multilingual
computing, while ASCII is limited to English characters.
Microprocessor

Question 19: What is clock speed in a microprocessor?


Answer:
Clock speed (measured in MHz or GHz) indicates the number of cycles per second a processor can
execute. Higher speeds generally mean faster processing.

Question 20: Differentiate between CISC and RISC processors.


Answer:

 CISC (Complex Instruction Set Computing): Uses many complex instructions, allowing more
operations per instruction but slower execution per instruction.

 RISC (Reduced Instruction Set Computing): Uses fewer, simpler instructions for faster
execution, often with pipelining.

Memory Concepts: Units

Question 21: How many bytes are in a Gigabyte?


Answer:
1 Gigabyte = 1,073,741,824 bytes (2^30 bytes).

Primary Memory

Question 22: What is the role of cache memory?


Answer:
Cache memory, located near the CPU, stores frequently used data and instructions, reducing access
time from main memory.

Question 23: Differentiate between RAM and ROM.


Answer:

 RAM (Random Access Memory): Volatile, temporary storage for running programs.

 ROM (Read-Only Memory): Non-volatile, stores firmware, unmodifiable by users.

Secondary Memory

Question 24: What is a pen drive and how does it work?


Answer:
A pen drive (USB flash drive) is a portable storage device using flash memory. It connects via USB and
enables easy file transfer.

Question 25: What is the advantage of a Blu-ray disk over a DVD?


Answer:
Blu-ray disks offer higher storage (25GB single-layer, 50GB dual-layer) compared to DVDs (4.7GB
single-layer, 8.5GB dual-layer), supporting better video quality and more data.
Input Output Ports/Connections

Question 26: What is the difference between serial and parallel ports?
Answer:

 Serial Port: Transmits data one bit at a time (e.g., modems).

 Parallel Port: Transmits multiple bits simultaneously (e.g., printers).

Question 27: What is Bluetooth and how is it used?


Answer:
Bluetooth is a wireless technology for short-range device communication (e.g., connecting phones to
headsets or transferring files).

Unit 2: Introduction to C++

Getting Started

Question 28: What are the different types of tokens in C++?


Answer:

1. Identifiers: Names for variables, functions, etc.

2. Keywords: Reserved words (e.g., int, float).

3. Constants: Fixed values (e.g., 10, 'a', "hello").

4. Operators: Symbols for operations (e.g., +, -, *, /).

Coding Question 29: Write a C++ program that prints "Hello, World!" to the console.
Answer:

cpp

CollapseWrapCopy

#include <iostream.h>

int main() {

cout << "Hello, World!" << endl;

return 0;

Data Types, Variables, and Constants

Question 30: What are the built-in data types in C++?


Answer:

 char
 int

 float

 double

Question 31: Explain the difference between a variable and a constant.


Answer:

 Variable: A named memory location whose value can change during execution.

 Constant: A named memory location whose value remains fixed after initialization.

Question 32: What is the use of the 'const' keyword in C++?


Answer:
The 'const' keyword defines constants, preventing their values from being modified after
initialization.

Operator and Expressions

Question 33: What is the precedence of operators in C++?


Answer:
Operators follow a hierarchy determining evaluation order (e.g., multiplication/division precede
addition/subtraction).

Question 34: Explain the difference between prefix and postfix increment operators.
Answer:

 Prefix (++i): Increments the value before use in an expression.

 Postfix (i++): Uses the current value, then increments it.

Question 35: What is type casting in C++?


Answer:
Type casting converts a variable’s data type, either implicitly by the compiler or explicitly by the
programmer.

Unit 3: Programming Methodology

General Concepts

Question 36: Why is modular programming important?


Answer:
Modular programming divides a program into smaller, manageable modules/functions, simplifying
development, testing, and maintenance.

Question 37: What are the different types of errors in programming?


Answer:

1. Syntax Errors: Code structure mistakes (caught by the compiler).

2. Run-Time Errors: Errors during execution (e.g., division by zero).


3. Logical Errors: Logic mistakes causing incorrect results.

Problem Solving Methodologies

Question 38: What are the steps involved in problem-solving in programming?


Answer:

1. Understand the problem.

2. Identify inputs and outputs.

3. Design an algorithm.

4. Implement the solution in code.

5. Test and debug.

6. Optimize performance.

Question 39: What is the difference between conditional control and looping structures?
Answer:

 Conditional Control: Executes code based on conditions (e.g., if-else, switch).

 Looping Structures: Repeats code until a condition is met (e.g., for, while).

Unit 4: Programming in C++

Flow of Control

Question 40: Write a C++ program that uses if-else to check if a number is even or odd.
Answer:

cpp

CollapseWrapCopy

#include <iostream.h>

int main() {

int num;

cout << "Enter a number: ";

cin >> num;

if (num % 2 == 0) {

cout << "Even" << endl;

} else {

cout << "Odd" << endl;

}
return 0;

Question 41: Explain the difference between while and do-while loops.
Answer:

 while loop: Checks the condition before execution; may not execute if false initially.

 do-while loop: Executes at least once before checking the condition.

Inbuilt Functions

Question 42: What is the purpose of the <iostream.h> header file?


Answer:
It provides input/output functions like cout and cin for console operations.

Question 43: Give an example of a string function in C++.


Answer:

 strcpy(): Copies one string to another.

User Defined Functions

Question 44: What is a function prototype in C++?


Answer:
A function prototype declares a function’s name, return type, and parameters before its definition,
allowing pre-definition calls.

Question 45: Explain call by value and call by reference.


Answer:

 Call by Value: Passes a copy of the argument; changes don’t affect the original.

 Call by Reference: Passes the address; changes affect the original.

Coding Question 46: Write a C++ function that swaps two integers using call by reference.
Answer:

cpp

CollapseWrapCopy

void swap(int &a, int &b) {

int temp = a;

a = b;

b = temp;

}
Structured Data Type: Arrays

Question 47: What are the advantages of using arrays in C++?


Answer:

 Stores multiple values of the same type.

 Easy element access via indices.

 Efficient for searching and sorting.

Coding Question 48: Write a C++ program to find the sum of elements in a one-dimensional array.
Answer:

cpp

CollapseWrapCopy

#include <iostream.h>

int main() {

int arr[5] = {1, 2, 3, 4, 5};

int sum = 0;

for(int i = 0; i < 5; i++) {

sum += arr[i];

cout << "Sum: " << sum << endl;

return 0;

Strings

Question 49: How do you declare and initialize a string in C++?


Answer:

cpp

CollapseWrapCopy

char str[10] = "Hello";

OR

cpp

CollapseWrapCopy

#include <string.h>

string str = "Hello";


Coding Question 50: Write a C++ program to count the number of vowels in a string.
Answer:

cpp

CollapseWrapCopy

#include <iostream.h>

#include <string.h>

int main() {

char str[100];

cout << "Enter a string: ";

gets(str);

int count = 0;

for(int i = 0; str[i] != '\0'; i++) {

char ch = tolower(str[i]);

if(ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u') {

count++;

cout << "Number of vowels: " << count << endl;

return 0;

Two-dimensional Array

Question 51: How do you declare a two-dimensional array in C++?


Answer:

cpp

CollapseWrapCopy

int arr[3][4]; // 3 rows, 4 columns

Coding Question 52: Write a C++ program to find the sum of elements in each row of a 2D array.
Answer:

cpp

CollapseWrapCopy

#include <iostream.h>
int main() {

int arr[2][3] = {{1,2,3},{4,5,6}};

for(int i = 0; i < 2; i++) {

int sum = 0;

for(int j = 0; j < 3; j++) {

sum += arr[i][j];

cout << "Sum of row " << i+1 << ": " << sum << endl;

return 0;

User-defined Data Types: Structures

Question 53: What is a structure in C++?


Answer:
A structure is a user-defined data type grouping related variables of different types under one name.

Coding Question 54: Write a C++ program that defines a structure for a student with name and
age, and displays the details.
Answer:

cpp

CollapseWrapCopy

#include <iostream.h>

struct Student {

char name[50];

int age;

};

int main() {

Student s;

cout << "Enter name: ";

gets(s.name);

cout << "Enter age: ";

cin >> s.age;


cout << "Name: " << s.name << ", Age: " << s.age << endl;

return 0;

Typedef and Macros

Question 55: What is the use of the typedef keyword in C++?


Answer:
Typedef creates an alias for a data type, enhancing code readability and maintainability.

Question 56: What is a macro in C++ and how is it defined?


Answer:
A macro is a preprocessor directive defined with #define, replacing its name with a value before
compilation.

Coding Question 57: Give an example of using typedef and #define in C++.
Answer:

cpp

CollapseWrapCopy

typedef int Integer;

#define PI 3.14

You might also like