ACP3_6

//BCA Support - www.bcasupport.xyz #include <stdio.h> void main() { int num[10]={1,2,3,4,5,10,6,7,8,9},a,b,temp; int *ptr; clrscr(); ptr=num; for(a=0;a<10;a++) for(b=a+1;b<10;b++) if(*(ptr+a)<*(ptr+b)) { temp=*(ptr+b); *(ptr+b)=*(ptr+a); *(ptr+a)=temp; } printf("\nLargest number in array : %d",*ptr); getch(); }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.