+3 votes
in Class 12 by kratos

Write the structure definition to store name of the student, register number, class and Show how is the structure initialized? Give an example.

1 Answer

+4 votes
by kratos
 
Best answer

struct student

{

int regno;

char name[50];

char class[6];

};

Initialization is done at the time of declaration of a variable.

For example

student s2 = {100,"Dushyanth","IIA"};

...