Computer Science, asked by priyankagwpbokaro, 6 months ago

(b) Write a program to input record (name, branch, batch) of 5 students and display them​

Answers

Answered by subgb98
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