COMPUTER
COMPUTER
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.
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 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.
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 10: Using Windows OS, explain how to create a folder, rename it, and delete it.
Answer:
1. Create a Folder:
2. Rename a Folder:
o Select "Rename."
3. Delete a Folder:
o Select "Delete."
o Confirm deletion.
Utility Software
Application Software
Question 14: Give an example of domain-specific application software and its use.
Answer:
Number System
Question 15: Convert the decimal number 25 to binary, octal, and hexadecimal.
Answer:
Binary: 11001
Octal: 31
Hexadecimal: 19
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).
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.
Primary Memory
RAM (Random Access Memory): Volatile, temporary storage for running programs.
Secondary Memory
Question 26: What is the difference between serial and parallel ports?
Answer:
Getting Started
Coding Question 29: Write a C++ program that prints "Hello, World!" to the console.
Answer:
cpp
CollapseWrapCopy
#include <iostream.h>
int main() {
return 0;
char
int
float
double
Variable: A named memory location whose value can change during execution.
Constant: A named memory location whose value remains fixed after initialization.
Question 34: Explain the difference between prefix and postfix increment operators.
Answer:
General Concepts
3. Design an algorithm.
6. Optimize performance.
Question 39: What is the difference between conditional control and looping structures?
Answer:
Looping Structures: Repeats code until a condition is met (e.g., for, while).
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;
if (num % 2 == 0) {
} else {
}
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.
Inbuilt Functions
Call by Value: Passes a copy of the argument; changes don’t affect the original.
Coding Question 46: Write a C++ function that swaps two integers using call by reference.
Answer:
cpp
CollapseWrapCopy
int temp = a;
a = b;
b = temp;
}
Structured Data Type: Arrays
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 sum = 0;
sum += arr[i];
return 0;
Strings
cpp
CollapseWrapCopy
OR
cpp
CollapseWrapCopy
#include <string.h>
cpp
CollapseWrapCopy
#include <iostream.h>
#include <string.h>
int main() {
char str[100];
gets(str);
int count = 0;
char ch = tolower(str[i]);
count++;
return 0;
Two-dimensional Array
cpp
CollapseWrapCopy
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 sum = 0;
sum += arr[i][j];
cout << "Sum of row " << i+1 << ": " << sum << endl;
return 0;
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;
gets(s.name);
return 0;
Coding Question 57: Give an example of using typedef and #define in C++.
Answer:
cpp
CollapseWrapCopy
#define PI 3.14