structures
Thu Jun 09 2022 17:16:23 GMT+0000 (Coordinated Universal Time)
Saved by
@KanishqJ8
#include <string.h>
struct student{
int id;
char fav_char;
int marks;
char name[34];
};
int main(){
struct student a, b, c,harry;
a.id=2;
b.id=1;
c.id=3;
a.marks=466;
b.marks=66;
c.marks=5;
a.fav_char='p';
b.fav_char='p';
c.fav_char='p';
strcpy(harry.name,"harry potter");
printf("marks got %d\n",a.marks);
printf("your name is %s\n",harry.name);
return 0;
}
content_copyCOPY
Comments