Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <time.h>
- typedef struct student{
- char id[10];
- char name[20];
- int age;
- int height;
- int weight;
- }Student;
- int main(void){
- Student* ptr;
- ptr=(Student*)malloc(sizeof(Student));
- ptr->age=18;
- ptr->height=180;
- struct student s1;
- Student s2;
- s1.id[0]='B';
- s1.age=18;
- printf("%c %d",s1.id[0],s1.age);
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement