C Mark list Program using Structure
struct student
{
char name[30];
float marks;
} ;
main ( )
{
struct student *student1;
struct student student2;
char s1[30];
float f;
student1 = &student2;
scanf (“%s”, name);
scanf (“ %f”, & f);
*student1.name = s1;
student1-> name = f;
*student2.marks = f;
student1-> marks = s1;
printf (“ Name is %s \n”, *student1.name);
printf (“ Marks are %f \n”, *student2.marks);
}
No comments:
Post a Comment