3 views

Uploaded by sakharam_gawade

save

You are on page 1of 6

INPUT

#include<iostream.h>

#include<conio.h>

void main()

{

clrscr();

int *p=0,i=0,j,temp,arr[20],l;

cout<<"\nEnter the length of array";

cin>>l;

for(i=0;i<l;i++)

{

cin>>arr[i];

}

p=arr;

for(i=0;i<l;i++)

{

for(j=i+1;j<l;j++)

{

if(arr[i]>arr[j])

{

temp=arr[i];

arr[i]=arr[j];

arr[j]=temp;

}

}

}

**cout<<"Ascending order";
**

for(i=0;i<l;i++)

{

cout<<endl<<*p;

p++;

}

getch();

}

OUTPUT

Enter the length of array8

6

8

3

45

35

2

1

0

Ascending order

0

1

2

3

6

8

35

45

EXP12_2

INPUT

#include<iostream.h>

#include<conio.h>

void main()

{#include<iostream.h>

#include<conio.h>

void main()

{

clrscr();

int *p,i,j,temp=0,arr[20],l;

cout<<"Enter length of array";

cin>>l;

for(i=0;i<l;i++)

{

cin>>arr[i];

}

p=arr;

for(i=0;i<l;i++)

{

if(*p>temp)

{

temp=*p;

p++;

}

}

cout<<"Largest number in array";

cout<<endl<<temp;

getch();

}

OUTPUT

Enter length of array10

2

3

5

10

33

56

74

2

3

2

Largest number in array

74

EXP12_3

INPUT

#include<iostream.h>

#include<conio.h>

void main()

{

clrscr();

int *p=0,i=0,j,temp,arr[4],arr1[4];

cout<<"Enter 5 numbers";

for(i=0;i<4;i++)

{

cin>>arr[i];

}

p=&arr[0];

for(i=0;i<4;i++)

{

arr1[i]=*p;

p++;

}

cout<<"Copied array:\n";

for(i=0;i<4;i++)

{

cout<<arr1[i]<<"\t";

}

getch();

}

OUTPUT

Enter length of array10

5 67 34 32 67 8 12 89 0 87

Copied array:

5

67

34

32

67

8

12

89

0

87

- EXP4_2Uploaded bysakharam_gawade
- EXP3_3Uploaded bysakharam_gawade
- exp1_2(OOP)Uploaded bysakharam_gawade
- EXP3_4Uploaded bysakharam_gawade
- EXP4_3Uploaded bysakharam_gawade
- exp1_3(OOP)Uploaded bysakharam_gawade
- EXP4_4Uploaded bysakharam_gawade
- EXP5_2Uploaded bysakharam_gawade
- EXP5_1Uploaded bysakharam_gawade
- EXP3_1Uploaded bysakharam_gawade
- exp1_4(OOP)Uploaded bysakharam_gawade
- EXP4_1Uploaded bysakharam_gawade
- EXP3_2Uploaded bysakharam_gawade
- EXP5_3Uploaded bysakharam_gawade
- Exp 10Uploaded bysakharam_gawade
- EXP6_2Uploaded bysakharam_gawade
- exp13Uploaded bysakharam_gawade
- EXP5_5Uploaded bysakharam_gawade
- EXP8_2Uploaded bysakharam_gawade
- EXP7_4Uploaded bysakharam_gawade
- EXP6_1Uploaded bysakharam_gawade
- EXP7_2Uploaded bysakharam_gawade
- EXP8_1Uploaded bysakharam_gawade
- EXP7_3Uploaded bysakharam_gawade
- EXP11Uploaded bysakharam_gawade
- EXP8_3Uploaded bysakharam_gawade
- EXP6_3Uploaded bysakharam_gawade
- EXP7_1Uploaded bysakharam_gawade

- dt manual (6)Uploaded bysakharam_gawade
- Exp 10Uploaded bysakharam_gawade
- About BlankUploaded bysakharam_gawade
- dt manual (5)Uploaded bysakharam_gawade
- dt manual (10)Uploaded bysakharam_gawade
- exp13Uploaded bysakharam_gawade
- dt manual (13)Uploaded bysakharam_gawade
- dt manual (8)Uploaded bysakharam_gawade
- Aritificial Intelligence EXP1Uploaded bysakharam_gawade
- EXP11Uploaded bysakharam_gawade
- dt manual (11)Uploaded bysakharam_gawade
- dt manual (12)Uploaded bysakharam_gawade
- dt manual (7)Uploaded bysakharam_gawade
- dt manual (14)Uploaded bysakharam_gawade
- dt manual (9)Uploaded bysakharam_gawade
- OOP ch1 (3)Uploaded bysakharam_gawade
- dt manual (2)Uploaded bysakharam_gawade
- OOP ch1 (5)Uploaded bysakharam_gawade
- dt manual (4)Uploaded bysakharam_gawade
- OOP ch1 (4)Uploaded bysakharam_gawade
- OOP ch1 (8)Uploaded bysakharam_gawade
- dt manual (3)Uploaded bysakharam_gawade
- OOP ch1 (10)Uploaded bysakharam_gawade
- OOP ch1 (12)Uploaded bysakharam_gawade
- OOP ch1 (6)Uploaded bysakharam_gawade
- OOP ch1 (9)Uploaded bysakharam_gawade
- OOP ch1 (11)Uploaded bysakharam_gawade
- OOP ch1 (7)Uploaded bysakharam_gawade
- dt manual (1)Uploaded bysakharam_gawade