Create a structure named company which has name, address, phone and no of Employee as member variables. Read name of company, its address, phone and no of Employee. Finally display these members’ value.

   

 Q .  Create a structure named company which has name, address, phone and no of Employee as member variables. Read name of company, its address, phone and no of Employee. Finally display these members’ value.



ans .     

                                           PROGRAM


    #include <stdio.h>
#include <stdlib.h>
struct company
{
    char name[20],address[50];
    int phone,noOfEmployee;
};

int main(){
   
    struct company C1;
    printf("enter the details of the company");
    scanf("%s%s%d%d",C1.name,C1.address,&C1.phone,&C1.noOfEmployee);
    printf("Details of the company");
    printf("company name=%s \n company address=%s \n company phone=%d \n company noOfEmployee=%d ",C1.name,C1.address,C1.phone,C1.noOfEmployee);
}




                                     OUTPUT


Create a structure named company which has name, address, phone and no of Employee as member variables. Read name of company, its address, phone and no of Employee. Finally display these members’ value.

Comments

  1. This comment has been removed by the author.

    ReplyDelete
  2. Upon passing the resolution, the change in registered office must file a form INC22 with the MCA. It must be filed within 30 days of passing the resolution. Utility bills, and NOCs from the owner, as well as a rental agreement, if the building is rented, must be attached.

    ReplyDelete

Post a Comment

Popular posts from this blog

Create a structure TIME with members hours, minutes and seconds. Write a C program to add two time objects by passing structure variables to function and display result in H: M: S format.

Write a c program to check a voting AGE condition using if-else