(b) Write a program to input record (name, branch, batch) of 5 students and display them
Answers
Answered by
1
Answer:
This code is written in c;
#include<stdio.h>
struct student
{
char name[20];
char branch[20];
char batch[20];
};
void main()
{
student s[5];
for(int i=0;i<5;i++)
scanf("%s %s %s",&s[i].name,s[i].branch,&s[i].batch);
for(int i=0;i<n;i++)
printf("%s %s %s\n",s[i].name,s[i].branch,s[i].batch);
}
Similar questions
Math,
2 months ago
Math,
2 months ago
Math,
2 months ago
Math,
5 months ago
Political Science,
10 months ago
Environmental Sciences,
10 months ago