#include<stdio.h>
int main ()
{
int n = 20;
int roll_num[n];
int marks[n];
for (int i = 0; i < n; i++)
{
printf("Student no: %d\n", i+1);
printf("Enter student roll no: ");
scanf("%d", &roll_num[i]);
printf("Enter student marks: ");
scanf("%d", &marks[i]);
}
for (int i = 0; i < n; i++)
{
printf("Final details of student no: %d\n", i+1);
printf("Roll no: %d Marks: %d \n", roll_num[i], marks[i]);
}
return 0;
}
First loop mai scanf k andar &roll_no[n] aur &marks[n] ki jagah &roll_no[i] aur &marks[i] aayega and same mistake second loop k printf mai bhi hai. @sujal kindly make this corrections in the code
ReplyDeleteohk , correct ho gaya.
Delete