Class_12_CS_Complete_Notes
Class_12_CS_Complete_Notes
b. ==
b. 4
d. Logical
b. %
b. Comment
c. 0 to 65535
a. sum += n
8. How cursor is moved to the next tabular position for printing data?
b. By using manipulator
d. &&
Answer:
Header files contain prewritten code like function declarations, making it easier to use features like
input/output.
Q2. Why escape sequences are used? Give three examples with explanation.
Answer:
Examples:
Q3. Define variable and write the rules for specifying variable names.
Answer:
Rules:
Answer:
Answer:
- Assignment Operator (=): Assigns a value to a variable.
Answer:
Reserved words are special keywords in C++ that have a fixed meaning and cannot be used as variable
names.
Answer:
Answer:
- RAM (Random Access Memory): Temporary, volatile memory that loses data when power is off.
Answer:
A hard disk stores data magnetically on spinning platters. A read/write head moves to access data.
Answer:
Devices that store data permanently and externally, like Hard Disks, SSDs, and USB drives.
Answer:
Types:
- Accumulator
Answer:
- Nibble: 4 bits.
- Byte: 8 bits.
Answer:
Answer:
Types:
- Data Bus
- Address Bus
- Control Bus
Q16. Define ports. Explain the functions of different ports used in computer.
Answer:
Examples:
Answer:
Optical disks use laser technology to read and write data on the disk surface.
Answer:
Example:
cout << i;
Answer:
Answer:
Example:
cout << j;
Answer:
Switch statement selects one of many blocks of code based on a variable value.
Example:
switch(x) {
case 1: cout << "One"; break;
Answer:
Answer:
GUI allows users to interact with a system using graphical elements like icons and windows.
Answer:
Answer:
Q1. Write a program that reads temperature in Fahrenheit and prints its equivalent in Celsius.
#include<iostream>
int main() {
float f, c;
cin >> f;
c = 5.0/9 * (f - 32);
return 0;
}
Q2. Write a program that reads length and breadth of a rectangle and prints its area.
#include<iostream>
int main() {
return 0;
Q3. Write a program that reads four integers and prints their sum, product, and average.
#include<iostream>
int main() {
int a, b, c, d;
return 0;
Q4. Write a program that reads the base and height of a triangle and prints its area.
#include<iostream>
int main() {
return 0;
Answer:
- LAN (Local Area Network): Connects computers in a small area (e.g., school).
Answer:
Answer:
Done!