Find error...I get a student data's and the program output is to get a detail of roll no | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Find error...I get a student data's and the program output is to get a detail of roll no

#include<stdio.h> struct student { int rollno; char name; int marks[5]; }; int main() { struct student s[5]; int i,j,k; for(i=1;i<5;i++) { printf("enter student %d details",i+1]); scanf("%d%s",s[i].rollno,s[i].name); for(j=0;j<5;j++) { printf("enter mark %d",j+1); scanf("%d",s[i].marks[j]); } } for(k=0;k<5;k++) printf("%d",s[k].rollno); return 0; }

10th Feb 2020, 5:11 PM
Ragul P
Ragul P - avatar
1 Answer
0
What is the error u r getting? Your program is also not complete.
10th Feb 2020, 5:48 PM
Peter Parker
Peter Parker - avatar