freedownloadpowerpoint com n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
FreeDownloadPowerPoint.Com PowerPoint Presentation
Download Presentation
FreeDownloadPowerPoint.Com

Loading in 2 Seconds...

play fullscreen
1 / 42

FreeDownloadPowerPoint.Com - PowerPoint PPT Presentation


  • 113 Views
  • Uploaded on

FreeDownloadPowerPoint.Com. SWAPPING FUNCTION. #include<constream.h> void swap(int&a,int&b) {int temp; temp=a; a=b; b=temp; }. Continue…. void main() {int a,b; clrscr(); cin>>a>>b; swap(a,b); cout<<"A="<<a<<endl<<"B="<<b; getch();}. Output……. POINTER WITHOUT FUNCTION.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

FreeDownloadPowerPoint.Com


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
freedownloadpowerpoint com

FreeDownloadPowerPoint.Com

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

swapping function
SWAPPING FUNCTION

#include<constream.h>

void swap(int&a,int&b)

{int temp;

temp=a;

a=b;

b=temp;

}

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

continue
Continue….

void main()

{int a,b;

clrscr();

cin>>a>>b;

swap(a,b);

cout<<"A="<<a<<endl<<"B="<<b;

getch();}

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

output
Output……

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

pointer without function
POINTER WITHOUT FUNCTION

#include<constream.h>

void main()

{clrscr();

int x=2,y=5;

int*px,*py;

px=&x;

py=&y;

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

continue1
Continue……

*px+=10;

*py+=20;

cout<<*px<<endl<<*py;

getch();

}

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

output1
Output……

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

find factorial by pointer using by reference concept
FIND FACTORIAL BY POINTER USING “BY REFERENCE” CONCEPT

#include<constream.h>

void fact(int &y)

{int z=1;

for(int q=y;q>=1;q--)

{

z=z*q;

y=z; }}

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

continue2
Continue….

void main()

{clrscr();

int x;

cin>>x;

fact(x);

cout<<"the factorial="<<x;

getch();}

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

output2
Output……

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

stdio h
stdio.h
  • stdio.h, which stands for "standard input/output header", is the header in the Cstandard library that contains macro definitions, constants, and declarations of functions and types used for various standard input and output operations.

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

printf
printf
  • Printf functions (which stands for "print formatted") are a class offunctions typically associated with some types of programming languages,particularly used for the printing purpose.

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

write your name in colorful and blinking manner
WRITE YOUR NAME IN COLORFUL AND BLINKING MANNER

#include<constream.h>

void main()

{clrscr();

textcolor(GREEN+BLINK);

textbackground(BLUE);

cprintf("ENGR.SABA MUGHAL");

getch();}

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

output3
Output…..

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

bgi stands for borland graphics interface file name extension
BGI stands for “Borland Graphics Interface ”(File Name Extension)
  • Borland Graphics Interface also known as BGI, is a graphics library bundled with several Borland compilers for the DOS operating systems. BGI was also used to provide graphics for many other Borland products 

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

drawing a single line using graphics
DRAWING A SINGLE LINE USING GRAPHICS

#include<constream.h>

#include<graphics.h>

void main()

{

clrscr();

int gdriver=DETECT,gmode;

initgraph(&gdriver,&gmode,"C:\\tc-300\\bgi");

line(5,5,50,50);

getch(); }

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

output4
OUTPUT…..

SLANTING POSITIONED LINE WILL BE DRAWN

  • SLANTING MEANS:To give a direction other than perpendicular or horizontal to; make diagonal; cause to slope
  • IN OUPUT A DIAGONAL LINE WILL BE DRAWN

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

slide18
MAKE CODE USING dos.h,graphics.h,getmax,setcolor,text style and line statement to display animated lines with your name

#include<constream.h>

#include<graphics.h>

#include<dos.h>

void main()

{

int gdriver=DETECT,gmode,c=4;

initgraph(&gdriver,&gmode,"c:\\tc-300\\bgi");

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

continue3
Continue….

int x=getmaxx()/2;

int y=getmaxy()/2;

for(int i=0;i<=500;i+=20)

{

delay(100);

setcolor(c++);

line(x,i,x,0);

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

continue4
Continue….

line(x,y,0,i);

line(x,y,x*2,y);

}

settextjustify(0,1);

settextstyle(1,1,3);

setcolor(WHITE);

outtextxy(x,y,"ENGR.SABA MUGHAL");

getch();}

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

output5
Output…….

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

nested ellipses
NESTED ELLIPSES

#include<constream.h>

#include<graphics.h>

#include<dos.h>

void main()

{clrscr();

int driver=DETECT,mode,i=1;

initgraph(&driver,&mode,"c:\\tc-300\\bgi");

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

continue5
Continue….

int x=getmaxx()/2;

int y=getmaxy()/2;

for(int yrad=0;yrad<=100;yrad+=10)

{delay(1000);

setcolor(i++);

ellipse(x,y,360,0,yrad,y);

}

getch();

}

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

output6
Output………..

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

designing a polygon
DESIGNING A POLYGON

#include<conio.h>

#include<graphics.h>

#define LEFT 50

#define TOP 50

#define RIGHT 150

# define BOT 180

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

continue6
Continue….

int rightpara[]={150,50,180,20,180,135,150,180};

int topara[]={50,50,150,50,180,20,95,20,50,50};

void main()

{clrscr();

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

continue7
Continue….

int gdriver=DETECT,gmode;

initgraph(&gdriver,&gmode,"c:\\tc-300\\bgi");

setcolor(BLUE);

rectangle(LEFT,TOP,RIGHT,BOT);

setcolor(RED);

drawpoly(4,rightpara);

setcolor(GREEN);

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

continue8
Continue…..

drawpoly(5,topara);

setcolor(WHITE);

outtextxy(95,10,"(95,20)");

outtextxy(20,50,"(20,50)");

outtextxy(180,20,"(180,20)");

outtextxy(50,551,"(50,50)");

outtextxy(150,50,"(150,50)");

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

continue9
Continue….

outtextxy(180,135,"(180,135)");

outtextxy(150,180,"(150,180)");

outtextxy(20,182,"(20,180)");

getch();}

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

output7
Output…….

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

formation of spider s net by using line and circle statements
FORMATION OF SPIDER’S NET BY USING LINE AND CIRCLE STATEMENTS

#include<graphics.h>

#include<constream.h>

#include<dos.h>

void main()

{clrscr();

int driver=DETECT,mode,x,y;

initgraph(&driver,&mode,"c:\\tc-300\\bgi");

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

continue10
Continue….

x=getmaxx();

y=getmaxy();

for(int i=0;i<600;i+=25)

{delay(200);

setcolor(i);

circle(x/2,y/2,i);

line(x/2,y/2,x-i,y);

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

continue11
Continue…..

line(x/2,y/2,0,y-1);

line(x/2,y/2,0+i,0);

line(x/2,y/2,x,0+i);

}

getch();}

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

output8
Output……..

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

why windows start from c drive why not from a drive or b drive
WHY WINDOWS START FROM C: DRIVE WHY NOT FROM A: DRIVE OR B: DRIVE
  • We found the answer to your question, along with several tangents on PC drive letters, on the discussion boards at StorageReview.com. This computer forum is exceptionally civil and informative.
  • The answer goes back to the glory days of floppy discs and DOS. The early DOS

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

answer continue
ANSWER CONTINUE…
  • operating system designated two drives, A and B, strictly for floppy drives. Why? Because many early computers didn't have native hard drives -- they booted from Drive A, and ran applications from Drive B.
  • Later, as computers came with hard drives, the second floppy drive became a useless

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

answer continue1
ANSWER CONTINUE…
  • appendage -- the computer equivalent of an appendix. To avoid confusion during the evolutionary window when computers with new hard drives coexisted beside computers with two floppies, the hard drives were given the "C" slot.
  • Technically speaking, the "computer" isn't missing the B drive, it's just that later Microsoft operating systems have omitted it as unnecessary.

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

concept of strings in c
CONCEPT OF STRINGS IN C++
  • This page summarizes many of the things you may find it useful to know when working with either C-strings or objects of the C++ string class.
  • The term string generally means an ordered sequence of characters, with a first character, a second character, and so on, and in most programming languages such

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

continue12
CONTINUE…

strings are enclosed in either single or double quotes. In C++ the enclosing delimiters are double quotes. In this form the string is referred to as a string literal and we often use such string literals in output statements when we wish to display text on the screen for the benefit of our users. For example, the usual first C++ program displays the string literal "Hello, world!" on

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

continue13
CONTINUE…

the screen with the following output statement:

cout << "Hello, world!" << endl; However, without string variables about all we can do with strings is output string literals to the screen, so we need to expand our ability to handle string data. When we talk about strings in C++, we must be careful because

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

continue14
CONTINUE…

the C language, with which C++ is meant to be backward compatible, had one way of dealing with strings, while C++ has another, and to further complicate matters there are many non-standard implementations of C++ strings. These should gradually disappear as compiler vendors update their products to implement the string component of the C++ Standard Library.

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT

nice wordings
NICE WORDINGS…..
  • A wise man first thinks and then speaks and a fool speaks first and then thinks.
  • Live amongst people in such a manner that if you die they weep over you and if you are alive they crave for your company.
  • The art of teaching is the art of assisting discovery.
  • The best teachers teach from the heart, not from the book.

COPY RIGHT@ ENGR.SABA MUGHAL FROM COMPUTER SYSTEMS DEPARTMENT