(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,
3 months ago
Math,
3 months ago
Math,
6 months ago
Political Science,
11 months ago
Environmental Sciences,
11 months ago