Arrays & string handling
practical 1.
Write a c program to Enter the Rollnumber and marks of 20 students using array and arrange accepted numbers in ascending order.
#include <stdio.h>
#include <conio.h>
void main()
{
int marks[20], r[20], i;
clrscr();
for (i = 1; i <= 2; i++)
{
printf("Enter %d student's Roll no & marks\t", i);
scanf("%d%d", &r[i], &marks[i]);
}
for (i = 1; i <= 2; i++)
{
printf("the %d students Roll No and marks are %d\t%d\n", i, r[i], marks[i]);
}
getch();
}
Thank you for coming seeya again
No comments:
Post a Comment