typedef

PHOTO EMBED

Thu Jun 09 2022 17:43:35 GMT+0000 (Coordinated Universal Time)

Saved by @KanishqJ8

/*typedef assignes new name to a previous name of a data type
typedef <previous name> <alias name>*/

 typedef struct student{
     int id;
     int marks;
 } std; 

 int main(){
     std s1,s2;
     s1.id=3;
     s2.id=0;
     printf("s1 id is %d\n",s1.id);
 }

//     int main(){
//     // int* a,b;
//     typedef int* intpointer;
//     intpointer a,b;
//     int c=89;
//     a=&c;
//     b=&c;
//     return 0;
// }
content_copyCOPY