INDEX Sr. No, Topic Remarks 1. Introduction to Computer Hardware 2. Installation Of Windows XP 3. Control Panel 4. Practice with MS Word 5. WAP to find whether a no. is palindrome or not 6. WAP to print the series- 2,4,6…………..20 terms 7. WAP to check whether a no. is greater than 200 or not 8. WAP to enter a no. and enter no. of spaces and then display it 9. WAP to enter a day no. and display the respective day 10. Write a small library program to show the use of function 11. WAP to enter marks of student and display all information using structures 12. WAP to enter employee’s data and display it in a systematic manner 13. WAP to create a structure student to enter students data and display results 14. WAP using structures to get students marks, calculate %age and then display their grades 15. WAP to enter a value and transfer the incremented value to a new variable and display it 16. WAP to show use of array by displaying input and output 17. WAP to input elements and then find the position of a specific 1
180
Embed
COMPUTER HARDWARE - WordPress.com€¦ · Web viewTo begin, open Microsoft Word by choosing ms-word application from all programs menu pad of start menu, then open new. Your screen
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
INDEX
Sr. No, Topic Remarks
1. Introduction to Computer Hardware2. Installation Of Windows XP3. Control Panel4. Practice with MS Word5. WAP to find whether a no. is palindrome or not6. WAP to print the series- 2,4,6…………..20 terms7. WAP to check whether a no. is greater than 200 or
not8. WAP to enter a no. and enter no. of spaces and then
display it9. WAP to enter a day no. and display the respective
day10. Write a small library program to show the use of
function11. WAP to enter marks of student and display all
information using structures12. WAP to enter employee’s data and display it in a
systematic manner 13. WAP to create a structure student to enter students
data and display results14. WAP using structures to get students marks,
calculate %age and then display their grades15. WAP to enter a value and transfer the incremented
value to a new variable and display it16. WAP to show use of array by displaying input and
output17. WAP to input elements and then find the position
of a specific element18. WAP to find whether a no. is prime or not19. WAP to find greatest of three no’s.20. WAP to calculate simple interest21. WAP to conduct multiple functions of
multiplication and addition22. WAP to calculate area and circumference of a
circle23. WAP to find biggest element of the array24. WAP to print fibonicci series25. WAP to check whether license can be issued to the
user or not26. WAP to print quotient and remainder27. WAP to find the day respective to the given day no.
1
28. WAP to display results of students in a systematic form using setw command
29. WAP to add 2 no’s using function30. WAP to enter no’s using array and find the position
of a specific no.31. WAP that finds area of rectangle circle and triangle
according to user’s requirement32. WAP that finds square, cube and fifth power of a
no.33. WAP to check whether a string is palindrome or
not34. WAP to input a matrix and display it35. WAP to add two matrices and display the result36. WAP to find transpose of a matrix37. WAP to multiply two matrices38. WAP to print AMRITSAR39. WAP to find average of n no’s.40. WAP to find smallest element in an array41. WAP to subtract two matrices42. WAP to find sum of diagonal elements of a matrix43. WAP to find vowels in a given string44. WAP to explain the concept of return statement
without condition45. WAP to explain the concept of return statement
with condition46. WAP to find factorial of a no. using recursion47. WAP to print fibbonicci series using recursion48. WAP to convert Celsius temperature into
Fahrenheit49. WAP to read the values of w,x,y,z and display the
value of p where p=w+x/y-z.
50. WAP to calculate area of circle, rectangle, triangle
depending upon user’s choice.
51. WAP to compute cosine series i.e cos(x)=1-x2/2!-
x4/4!-x6/6!+……xn/n!.
52. WAP to swap two numbers using function.
53. WAP that uses a function to sum n natural numbers
starting from a given number.
54. WAP to multiply two numbers to explain the
concept of prototype.
2
55. WAP to print multiplication table of a no.
56. WAP to print 12 as
1
2
57. W.A.P to print
*
**
***
****
*****
58. WAP to print
1
12
123
1234
59. WAP to print
1
22
333
4444
55555
60. WAP to find average of n numbers using while
loop.
61. WAP to display even numbers between 1 to 15.
62. WAP to check whether a given number is
palindrome or not.
63. Write a program to illustrate the use of pointer64. Write a program to use pointer with function65. Write a program to keep count of created objects
using static members
3
Practical No. 1INTRODUCTION TO COMPUTER HARDWARE
CPU:
It is the central electronic chip that determines the processing power of the computer, machine that executes computer programs.
Motherboard:
In personal computers, a motherboard is the central printed circuit board (PCB) in many modern computers and holds many of the crucial components of the system, providing connectors for other peripherals. The motherboard is sometimes alternatively known as the main board, system board, or, on Apple computers, the logic board.From the CPU to storage devices, from RAM to printer ports, the motherboard provides the connections that help them work together.The motherboard is the main circuit board inside your PC. Every component at some point communicates through the motherboard, either by directly plugging into it or by communicating through one of the motherboards ports. The motherboard is one big communication highway. Its purpose inside your PC is to provide a platform for all the other components and peripherals to talk to each other.
4
The Power Supply :
The internal power supply is responsible for converting your standard household power into a form that your computer can use. The power supply is responsible for powering every device in your computer; if it has a problem or is of low quality you may experience many difficulties that you may not realize are actually the fault of the electrical system. This section discusses what makes up the power supply and how it works in detail.
The Processor Socket:
Sockets are the home for your Central Processor Unit (CPU). Several types of socket exist, but only 2 of them are really used, and both of them are used by Intel and AMD. The Pin Grid Array (PGA) and the Land Grid Array (LGA).
With the type PGA, the CPU will have pins to fit in the socket holes, but with the type LGA, the CPU will not have such pins and will just sit on the socket. To know the form of CPU your motherboard can use and the range of powers and FSBs, look in your motherboard's book. The book that comes with your motherboard has a chart about it in the socket or CPU chapter. That information will give you an idea to how far you can upgrade your CPU.
System Bus:
It is the bus that connects the CPU to main memory on the motherboard. I/O buses, which connect the CPU with the systems other components, branch off of the system bus.The system bus is also called the frontside bus, memory bus, local bus, orhost bus.
Random-access Memory (RAM):
Random-access memory (RAM) is a form of computer data storage. Today, it takes the form of integrated circuits that allow stored data to be accessed in any order (that is, at random). "Random" refers to the idea that any piece of data can be returned in a constant time, regardless of its physical location and whether it is related to the previous piece of data.
Memory slots:
Memory slots also call memory banks are for Random Access Memory modules (RAM). Each memory bank can receives a RAM module designed for a specific pc mother board. Ranging from 2 to 4 banks, you will encounter single and dual-channel technologies.
With single-channel, you can use 1, 2 or 3 Ram modules, and it should work perfectly. On the other hand, with dual-channel technology, if you fill only 1 bank, you will lose some strength from your module. To get the most of it, you need to fill 2 banks with the same module types, from the same manufacturer with exactly the same memory amounts.
32 bit PCI Slots:
32 bit slots Peripheral Component Interconnect (PCI) are used to install sound cards, graphic cards, Ethernet cards and modems.
The motherboard parts Accelerated Graphics Port (AGP) and PCI Express (PCIe) focus on graphic cards only. PCIe standard is even better than AGP standard, and mostly the only one used right now. More motherboard content will be written on it, especially for graphic cards.
Motherboard Battery:
The battery gives the board a small amount of power in order to store some vital data on your machine when the power is off. Data stored is that like the time and date so you don't have to reset them every time you boot the machine up. Motherboard batteries are usually long lasting Lithium batteries. Removing this can reset all the data on your machine including the BIOS settings, however not replacing this correctly can lead to irreparable damage to the motherboard. Only remove the battery if it is dead or if you can't have access any other way to resetting the data on your machine by use of the clear CMOS jumper or something similar.
7
Hard Disk Drive:
A hard disk drive (HDD) is a non-volatile, random access device for digital data. It features rotating rigid platters on a motor-driven spindle within a protective enclosure. Data is magnetically read and written on the platter by read/write heads that float on a film of air above the platters.
Introduced by IBM in 1956, hard disk drives have fallen in cost and physical size over the years while dramatically increasing in capacity. Hard disk drives have been the dominant device for secondary of data in general purpose computers since the early 1960s. They have maintained this position because advances in their areal recording density have kept pace with the requirements for secondary storage. Today's HDDs operate on high-speed serial interfaces; i.e., serial ATA (SATA) or serial attached SCSI (SAS).
Disc Drive:
In computing, an optical disc drive (ODD) is a disk drive that uses laser light or electromagnetic waves near the light spectrum as part of the process of reading or writing data to or from optical discs. Some drives can only read from discs, but recent drives are commonly both readers and recorders. Recorders are sometimes called burners or writers. Compact discs, DVDs, and Blue-ray discs are common types of optical media which can be read and recorded by such drives.
Optical disc drives are an integral part of stand-alone consumer appliances such as CD players, DVD players and DVD recorders. They are also very commonly used in computers to read software and consumer media distributed in disc form, and to record discs for archival and data exchange. Optical drives—along with flash memory—have mostly displaced floppy disk drives and magnetic tape drives for this purpose because of the low cost of optical media and the near-ubiquity of optical drives in computers and consumer entertainment hardware.
Back Panel Connectors:
When the computer is mounted, those motherboard parts show up at the computer case back panel. They are used to plug the mouse, keyboard, monitor, printer, sound system and any other peripherals you may have.
In computing, a keyboard is a typewriter keyboard, which uses an arrangement of buttons or keys, to act as mechanical levers or electronic switches. After punch cards and paper tape, interaction via teletype-style keyboards became the main input device for computers. A keyboard typically has characters engraved or printed on the keys and each press of a key typically corresponds to a single written symbol. However, to produce some symbols requires pressing and holding several keys simultaneously or in sequence. While most keyboard keys produce letters, numbers or signs (characters), other keys or simultaneous key presses can produce actions or computer commands.
In computing, a mouse is a pointing device that functions by detecting two-dimensional motion relative to its supporting surface. Physically, a mouse consists of an object held under one of the user's hands, with one or more buttons. It sometimes features other elements, such as "wheels", which allow the user to perform various system-dependent operations, or extra buttons or features that can add more control or dimensional input. The mouse's motion typically translates into the motion of a cursor on a display, which allows for fine control of a graphical user interface.
OUTPUT DEVICES
Monitor: A monitor or display (sometimes called a visual display unit) is an electronic visual display for computers. The monitor comprises the display device, circuitry, and an enclosure. The display device in modern monitors is typically a thin film transistor liquid crystal display (TFT-LCD) thin panel, while older monitors use a cathode ray tube about as deep as the screen size. Originally computer monitors were used for data processing and television receivers for entertainment; increasingly computers are being used both for data
processing and entertainment. Displays exclusively for data use tend to have an aspect ratio of 4:3; those used also (or solely) for entertainment are usually 16:9 widescreen, Sometimes a compromise is used.
Printer: In computing, a printer is a peripheral which produces a text or graphics of documents stored in electronic form, usually on physical print media such as paper or transparencies. Many printers are primarily used as local peripherals, and are attached by a printer cable or, in most new printers, a USB cable to a computer which serves as a document source.
Practical No. 2STEPS FOR INSTALLING WINDOWS XP
Installing Windows XP can take up to two hours. To make the process more manageable,
it has been broken up into several sections. When you are ready, install Windows XP:
Write a program to swap two numbers using function.
#include<iostream.h>
#include<conio.h>
int main()
{
clrscr();
void swap(int &,int &);
int a,b;
a=7;b=4;
cout<<"the original values are";
cout<<"a="<<a<<"b="<<b<<endl;
swap(a,b);
cout<<"the values after swap() are";
135
cout<<"a="<<a<<"b="<<b<<endl;
return 0;
}
void swap(int &x,int &y)
{
int temp;
temp=x;
x=y;
y=temp;
cout<<"the swapped values are";
cout<<"a="<<x<<"b="<<y<<endl;
getch();
}
Output:
136
Write a program that uses a function to sum n natural numbers starting from a
given number.
#include<iostream.h>
#include<conio.h>
int summat(int first, int count);
int main()
{
clrscr();
unsigned long a,b,sum;
cout<<"enter the first natural number where from the sum is to be calculated";
cin>>a;
cout<<"how many numbers are to be added?";
cin>>b;
sum=summat(a,b);
cout<<"the sum is"<<sum;
return 0;
}
int summat(int first, int count)
137
{
unsigned long i,s=0,j=first;
for(i=0;i<count;i++)
s+=j++;
return s;
}
Output:
Write a program to multiply two numbers to explain the concept of prototype.
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
float a,b,mul(float,float);
cout<<"enter the value of a and b"<<endl;
cin>>a>>b;
cout<<"final result is"<<mul(a,b);
getch();
}
float mul(float x, float y)
{
float z;
138
z=x*y;
return(z);
}
Output:
Write a program to print multiplication table of a no.
#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
void main()
{
clrscr();
int i=1,n,a;
cout<<"enter a number whose table u want to print";
cin>>n;
while(i<=10)
{
a=n*i;
cout<<n<<"*"<<i<<"="<<a<<endl;
i++;
}
getch();
}
139
Output:
Write a program to print 12 as
1
2
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a,b,c;
cout<<"enter any two digit number";
cin>>a;
b=a/10;
c=a%10;
cout<<b<<endl<<c;
getch();
}
Output:
140
W.A.P to print
*
**
***
****
*****
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int i,j;
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
cout<<"*";
}
cout<<endl;
}
getch();
141
}
Output
142
W.A.P to print
1
12
123
1234.
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int i,j,n;
cout<<"enter the value of n";
cin>>n;
for(i=1;i<=n;i++)
{
for(j=1;j<=i;j++)
{
cout<<j;
}
cout<<endl;
}
getch();
}
Output:
143
144
W.A.P to print
1
22
333
4444
55555.
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int i,j,n;
cout<<"enter the value of n";
cin>>n;
for(i=1;i<=n;i++)
{
for(j=1;j<=i;j++)
{
cout<<i;
}
cout<<endl;
}
getch();
}
Output:
145
146
W.A.P to find average of n numbers using while loop.
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int i,n;
float av,sum;
cout<<"enter the value of n";
cin>>n;
sum=0;
i=1;
while(i<=n)
{
sum=sum+i;
i++;
}
av=sum/n;
cout<<"the average of n numbers is"<<av;
getch();
}
Output:
147
148
W.A.P to display even numbers between 1 to 15.
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a;
a=2;
while(a<=15)
{
a=a+2;
cout<<a<<endl;
}
getch();
}
Output:
149
W.A.P to check whether a given number is palindrome or not.
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int num,z,rev=0,rem;
cout<<"enter a number";
cin>>num;
z=num;
while(num>0)
{
rem=num%10;
num=num/10;
rev=(rev*10)+rem;
}
if(rev==z)
cout<<"number is palindrome";
else
cout<<"number is not palindrome";
getch();
}
Output:
150
Write a program to illustrate the use of pointer
#include<iostream.h>#include<conio.h>void main(){ clrscr(); char ab; int r; float p,q; ab='Z'; r=22; p=3.142; q=5.7; cout<<ab<<" is stored at address "<<&ab<<endl; cout<<r<<" is stored at address "<<&r<<endl; cout<<p<<" is stored at address "<<&p<<endl; cout<<q<<" is stored at address "<<&q; getche(); }
Write a program to use pointer with function
#include<iostream.h>#include<conio.h>void main(){ clrscr(); int arr[]={100,200,300,400,500}; void show(int *num,int n); show(&arr[0],4); getch();} void show(int *num,int n) { int i=0;
151
while(i<=n) { cout<<*num<<endl; i++; num++;}}
Write a program to keep count of created objects using static members#include<iostream.h>#include<conio.h>class X{int codeno;float price;static int count;public:void getval(int i,float j){codeno=i;price=j;++count;}void display(void){cout<<"Code no : "<<codeno<<" ";cout<<"Price : "<<price<<endl;}static void dispcount(void){cout<<"count = "<<count<<endl;}};int X::count=0;int main(){clrscr();X ob1,ob2;ob1.getval(101,25.12);ob2.getval(102,38.19);X::dispcount();X ob3;ob3.getval(103,49.00);X::dispcount();ob1.display();ob2.display();