structure formate in c

 #include<stdio.h>

#include<string.h>


struct employee{

int code;

float salary;

char name[10];

};


int main()

{

 

 struct employee e1 = {100,3645285,"nilabhru"};

 /*struct employee e1;

 e1.code = 100;

 e1.salary = 34.542;*/

 

// strcpy(e1.name , "Nilabhru");

 

 printf("%d\n",e1.code);

 printf("%0.3f\n",e1.salary);

 printf("%s\n",e1.name);

 

return 0;

}

Comments

Popular posts from this blog

create a num table in a new file in c

write a programme to compare time stamp in c

write a struct programme to keep bank details in c