Write A C Program To Store Student Information Like (Name, Roll & Marks) Of Single Student Using Structure or C Program to Store Information of Students Using Structure or C Program to Store Information(name, roll, and marks) of a Student or Program to maintain student details using structures or C Program to read name and marks of students and store it in file or C Program to display student details using structure members or C Program to Read and Print details of 50 Students using Structure or C Program Using Structure to Calculate Marks of 10 Students or C Program to Store Records of Students in an Array or C Program to Sort Array of Structure using Bubble Sort or Program to Store Information of Students Using Structure in C or Structure Student (Name, Marks, Roll Number) Program in C or A program using structures in C to store student information.
What Is Structure?
The structure is a user-defined data type in C. Structure is used to represent a record. Suppose you want to store a record of Student which consists of student name, address, roll number and age. You can define a structure to hold this information.
Defining a structure
struct keyword is used to define a structure. struct define a new data type which is a collection of different type of data.
Syntax :
struct structure_name
{
//Statements
};
Logic:-
Here We Are storing a single student information like roll number, name and marks Not using for loop
So just define a structure like Below.
struct student
{
char name[50];
int roll;
float marks;
};
Output:
Enter The Information of Students :
Enter Name : Mohamad
Enter Roll No. : 147917
Enter marks : 78.80
Displaying Information
Name: Mohamad
Roll: 147917
Marks: 78.80
need an explanation for this answer? contact us directly to get an explanation for this answer