c-record - 8) structure program with employees

 #include<stdio.h>

#include<conio.h>  

#include<string.h> 

struct Employee  

{     

   int id;  

   char name[20];  

   struct Date  

    {  

      int dd;  

      int mm;  

      int yyyy;   

    }doj;  

}e1;  

int main( )  

{  

clrscr();

   //storing employee information  

   e1.id=101;  

   strcpy(e1.name,"kishore");//copying string into char array  

   e1.doj.dd=10;  

   e1.doj.mm=11;  

   e1.doj.yyyy=2014;  

  

   //printing first employee information  

   printf( "employee id : %d\n", e1.id);  

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

   printf( "employee date of joining (dd/mm/yyyy) : %d/%d/%d\n", e1.doj.dd,e1.doj.mm,e1.doj.yyyy);  

   getch();  

}  

output:-

alt  +f9   ------   run and

ctrl+f9   ------  compile



Comments

Popular posts from this blog

digital marketing ppt-u1

SOFTWARE

cn lab

Computer Operations and Performing - D L Unit-1-1

DS-Record-mca-04) write a program for evaluating a given postfix expression using stack.

DBMS Degree Lab Records

Unit 2: Foundations of Ownership, Security Related Concepts in Blockchain

Unit-1 Foundations of Software Systems and Blockchain

Access the Internet to Browse Infromation & E-Mail Operation- D L Unit-2-1

6)what are the various service of internet and protocols ICT-unit-1