SOR_R_M - { temp1=A[a][0]; temp2=A[a][1]; A[a][0]=A[a+1][0];

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#include<stdio.h> #include<conio.h> void main (void) { int A[10][2],a,b,temp1,temp2; clrscr(); for(a=0;a<10;a++) { printf("Enter roll no & marks of student"); scanf("%d %d",&A[a][0],&A[a][1]); } for(b=0;b<10;b++) for(a=0;a<9;a++) if(A[a+1][1]>A[a][1])
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: { temp1=A[a][0]; temp2=A[a][1]; A[a][0]=A[a+1][0]; A[a][1]=A[a+1][1]; A[a+1][0]=temp1; A[a+1][1]=temp2; } printf(&quot;ROLL NO \t MARKS&quot;); for(a=0;a&lt;10;a++) printf(&quot;\n%d)%d\t%d&quot;,a+1,A[a][0],A[a][1]); getch(); }...
View Full Document

Ask a homework question - tutors are online