1.

write a program to input the name , class and section of student and print whether he is pass or fail(by denoting it with p and f) and input their mail id also

Answer»

A structure is a collection of items of different data TYPES. It is very useful in creating complex data structures with different data type records. A structure is defined with the struct keyword.An example of a structure is as FOLLOWS.struct employee { int empID; char name[50]; float salary;};A program that stores student information in a structure is given as follows.Example Live Demo#include using namespace std;struct student { int rollNo; char name[50]; float marks; char grade;};int main() { struct student s = { 12 , "Harry" , 90 , 'A' }; COUT<<"The student information is given as follows:"<



Discussion

No Comment Found