Академический Документы
Профессиональный Документы
Культура Документы
Chapter 1
Figure 1
Input Unit:- The input unit is formed by the input devices attached to the
computer. Examples of Input media are: keyboard, mouse, magnetic ink
character reader, optical mark reader, optical character reader, joystick etc.
An input unit takes the input and converts it into binary form so that it
can be understood by the computer.
Central Processing Unit(CPU):- The CPU is the control centre for the
compuetr. It guides and governs the performance. It Consists of Arithmatic
Logic Unit (ALU) & Control Unit (CU).
Output Unit:- The output unit is formed by the output units connected to
the computer. It converts the computer understandable language into the
human understandable language.
1
Usman Ghani
4. On the Monitor.
1
Usman Ghani
Figure 2
1
Usman Ghani
Figure 3
Chapter 2
1
Usman Ghani
Figure 4
Maximising:-To maximise the icon you have to click the maximise button
shown in Figure 4 at no. 2. The window will fit to screen.
1. Right click on the desktop at blank space the screen comes as show in
Figure 5
Figure 5
1
Usman Ghani
Chapter 3
Figure 6
1
Usman Ghani
Chapter 4
6. Click O.K.
1
Usman Ghani
Chapter 5
Figure 7
1
Usman Ghani
Chapter 6
MS WORD
Word Processors are the class of software application that is designed for
generating various documents like letter, faxes, resume, memorandum and notices
etc. Word Processing software provides a set of tools and utilities for entering,
editing and formatting text. In addition to typical word processing tasks, modern
word processors like MS Word, offer many interesting features like drawing various
objects, creating tables, inserting pictures and many more.
Features of MS word
Starting Word
To start word click once on the Start button, Choose Programs and click
once on Microsoft Office and then once on Microsoft Word.
1
Usman Ghani
TITLE BAR: It is the horizontal bar at the top of the window. It contains
the name of the current document. Until you save the document, WORD
automatically assigns a name. The title bar contains three buttons at its right
end. These are the buttons to minimize, restore and close the current
window.
MENU BAR: It is a horizontal bar, below the title bar that contains several
menus. Each of these menus contains several MS WORD commands and
utilities.
• File: - the file menu displays the several menu commands .The file menu is
used to perform a variety of file and printing operations. The main menu
selections or commands in the file pull down menu are: - New, Open, save,
1
Usman Ghani
Save as, Properties, Templates, Page setup, Print Preview, print, send, Exit
and some currently used and saved document files.
• Edit: -The edits menu displays several menu commands like: -Cut, Copy,
Paste, Clear, select all, Find, Replace, Goto, Bookmark.
• Window: - The window menu displays these commands: -New window,
arrange all, split, and some document filename.
• Help: - Help menu displays: -Microsoft word help topics, Answer wizards,
RULERS: Horizontal and vertical rulers appear on the top and left hand
side of the page. They help us to create and move the objects with accuracy.
PAGE AREA: The rectangular white area is the page of the document.
SCROLL BARS: Horizontal and vertical scrollbars are used to scroll the
document to the left, right, up and down.
STATUS BAR: Below the drawing toolbar, status bar is located. This bar
depicts the status of the current document. It displays the current page
number, section number, and page number/total number of pages in the
document.
1
Usman Ghani
(i) Application window: The area from the title bar till status bar.
(ii) Document window: The area between the ruler bar and the scroll bar
Go to file menu and click the open command or click on the open button of
the standard toolbar or press Ctrl+O from the keyboard.
Saving a Document
For this purpose either click the save command from the file menu or press
Ctrl+S or move the mouse pointer to the save button on the standard toolbar. A
save as dialog box will be shown in which type the file name in the filename box
and click OK button. The word document is saved with .doc extension.
1
Usman Ghani
Go to file menu and click the Close command or press Alt+F+C from the
keyboard.
Deleting a character
You can delete a character by moving the cursor to the desired location and
press the Del key. The del key deletes the character to the of cursor position. There
is another key backspace key, which is used to delete the character to left of the
cursor position.
Inserting a character
You can insert a character by moving the cursor to the desired location with mouse or
keyboard so that the insert mode becomes on.
To cut the text click the cut button from the standard toolbar or select the cut
command from the edit menu or press Ctrl+X key combination. To cut the desired
text highlight the text by selecting it and use any cut way. To copy the text by
highlighting it then click the copy button from the standard toolbar or select the
copy command from the edit menu or press the Ctrl+C key combination from the
keyboard. Now you can paste the text by copy command. To paste the text move
the cursor to the desired location where you want to paste and click the paste
button from the standard toolbar or select the paste command from the edit menu
or press Ctrl+V combination from the keyboard.
1
Usman Ghani
Highlight the text by selecting it and click center button on the formatting
toolbar or press Ctrl+E combination from the keyboard.
If you want to set the selected text or paragraph or whole document at the
left margin alignment then first highlight the required text by selecting it, now
either move the mouse pointer to Align left button on the formation toolbar or
press Ctrl+L key combination from the keyboard.
First highlight the required text by selecting it. Now either move the mouse
printer to Align right button or the formatting toolbar or press Ctrl+R key
combination from the keyboard.
First highlight the required text by selecting it. Now either move the mouse
pointer to the justify button on the formatting toolbar or press Ctrl+J key
combination from the keyboard.
Page Breaks
You can insert a manual page break any time you want to force Word to start
a new page. To insert a page break, move the cursor where you want to set the
1
Usman Ghani
page break. You can select Break command from the insert menu and click the
break command.
Chapter 8
Programming in C++
#include<iostream.h>
#include<conio.h>
void main()
getch();
Output:-
1
Usman Ghani
#include<iostream.h>
#include<conio.h>
void main()
int a,b,c,d,e,f,g;
cin>>a;
cin>>b;
c=a+b;
1
Usman Ghani
d=a-b;
e=a*b;
f=a/b;
g=a%b;
getch();
Output:-
1
Usman Ghani
#include<iostream.h>
#include<conio.h>
void main()
clrscr();
float a,b,c,d,e,f,g,h,i,j;
cin>>a;
b=a*a;
cin>>c;
cin>>d;
e=(c*d)/2;
cin>>f;
cin>>g;
h=f*g;
1
Usman Ghani
cin>>i;
j=3.14*i*i;
getch();
Output:-
On next page
#include<iostream.h>
#include<conio.h>
1
Usman Ghani
void main()
int a,b,c;
cin>>a;
cin>>b;
c=a>b?a:b;
getch();
Output:-
1
Usman Ghani
#include<iostream.h>
#include<conio.h>
void main()
float a,b,c,d;
cin>>a;
cin>>b;
cin>>c;
d=(a+b+c)/3;
getch();
Output:-
1
Usman Ghani
#include<iostream.h>
#include<conio.h>
void main()
int a,b;
1
Usman Ghani
cin>>a;
cin>>b;
b;
a;
getch();
Output:-
#include<iostream.h>
1
Usman Ghani
#include<conio.h>
void main()
clrscr();
int a,b;
cin>>a;
cin>>b;
if (a>b)
else
getch();
Output:-
1
Usman Ghani
#include<iostream.h>
#include<conio.h>
void main()
clrscr();
int n,j;
for(n=1;n<=10;n++)
cout<<n<<endl;
1
Usman Ghani
Output:-
10.Write a program to find the greatest of three o.s using nested if else:-
#include<iostream.h>
#include<conio.h>
void main()
clrscr();
int a,b,c;
cin>>a;
1
Usman Ghani
cin>>b;
cin>>c;
if(a>b)
if(b>c)
else
cout<<" ";
else
if(b>c)
else
getch();
Output:-
1
Usman Ghani
#include<iostream.h>
#include<conio.h>
void main()
int a[10],i;
a[0]=10;
for(i=0;i<=10;i++)
cin>>a[i];
cout<<a[i];
getch();
1
Usman Ghani
Output:-
#include<iostream.h>
#include<conio.h>
void main()
int A[2][2],B[2][2],r,c,flag=0;
for(r=0;r<2;r++)
for(c=0;c<2;c++)
1
Usman Ghani
cin>>A[r][c];
for(r=0;r<2;r++)
for(c=0;c<2;c++)
cin>>B[r][c];
for(r=0;r<2;r++)
for(c=0;c<2;c++)
if(A[r][c]!=B[r][c])
flag=1;
break;
if(flag==1)
break;
if(flag==1)
else
getch();
1
Usman Ghani
Output:-
#include<iostream.h>
#include<conio.h>
void main()
clrscr();
int a[2][2],b[2][2],r,c,e[2][2];
for(r=0;r<2;r++)
1
Usman Ghani
for(c=0;c<2;c++)
cin>>a[r][c];
for(r=0;r<2;r++)
for(c=0;c<2;c++)
cin>>b[r][c];
for(r=0;r<2;r++)
for(c=0;c<2;c++)
e[r][c]=a[r][c]+b[r][c];
for (r=0;r<2;r++)
for(c=0;c<2;c++)
getch();
Output:-
1
Usman Ghani
Erroeeee
15Write a program to add odd terms:-
#include<iostream.h>
#include<conio.h>
void main()
{ clrscr();
int n,sum=0,i=1;
cin>>n;
do
{ sum=sum+i;
i=i+2;
1
Usman Ghani
while(i<=n);
cout<<"1+3+5+...""is"<<n<<sum; }
getch();
Output:-
#include<iostream.h>
#include<conio.h>
void main()
clrscr();
1
Usman Ghani
float a,b,c,i;
for (i=0;i<=2;i++)
cout<<"Enter no.s";
cin>>a>>b;
if (b==0)
else
c=a/b;
cout<<c;
getch();
}
Output:-
1
Usman Ghani
#include<iostream.h>
#include<conio.h>
#include<stdio.h>
#include<string.h>
void main()
clrscr();
char s1[40],s2[20];
gets(s1);
1
Usman Ghani
gets(s2);
if(strcmp(s1,s2)<0)
cout<<"S1 is greater";
else
if(strcmp(s1,s2)>0)
cout<<"S2 is greater";
else
cout<<"S1=S2"<<endl;
strcat(s1,s2);
getch();
Output:-
1
Usman Ghani
#include<iostream.h>
#include<conio.h>
#include<string.h>
void main()
char srcstr[30],str[30],str2[10];
int i,n,j;
clrscr();
cin>>srcstr;
n=strlen(srcstr);
for(i=0,j=(n/2);srcstr[j]!=0;i++,j++)
1
Usman Ghani
str[i]=srcstr[i];
//cout<<str[];
str2[i]=srcstr[j] ;
} str[i]='\0';
str2[i]='\0';
for(i=0;str[i]!='\0';i++)
cout<<str[i]; }
for(i=0;str2[i]!='\0';i++)
cout<<str2[i]; }
getch();
Output:-
1
Usman Ghani
#include<iostream.h>
#include<conio.h>
void main()
clrscr();
int a,b,c;
cin>>a;
cin>>b;
c= multiply(a,b);
1
Usman Ghani
cout<<"Multiplication is "<<c;
getch();
int m;
m=x*y;
return m;
Output:-
#include<iostream.h>
#include<conio.h>
1
Usman Ghani
void main()
int x,y;
void swap(int,int);
clrscr();
cin>>x;
cin>>y;
swap(x,y);
cout<<"x="<<x<<endl;
cout<<"y="<<y<<endl;
getch();
int temp;
temp=a;
a=b;
b=temp;
cout<<"a="<<a<<endl;
cout<<"b="<<b<<endl;
Output:-
1
Usman Ghani
#include<iostream.h>
#include<conio.h>
void main()
int fact(int);
int f,n;
cin>>n;
f=fact(n);
cout<<"Factorial is"<<f<<endl;
getch();
1
Usman Ghani
int value=1;
if (n==1)
return value;
else
value=n*fact(n-1);
return value;
}}
Output:-
#include<iostream.h>
1
Usman Ghani
#include<conio.h>
void main()
clrscr();
class student
private:
char name[20];
int age;
public:
void getdata()
cin>>name;
cout<<"Enter age"<<endl;
cin>>age;
void showdata()
cout<<"Name:"<<name<<endl;
cout<<"Age:"<<age<<endl;
};
void main();
1
Usman Ghani
student std;
std.getdata();
std.showdata();
getch();
}}
Output:-
#include<iostream.h>
#include<conio.h>
void main()
clrscr();
class b
1
Usman Ghani
public:
void show()
}};
public:
void show()
}};
void main();
b obj;
d obj1;
obj.show();
obj1.show();
}}
Output:-
1
Usman Ghani