for the structure

 # include <stdio.h>

# include <string.h>
 typedef struct address{
    int houseNo;
    int block;
    char city[100];
    char state[200];
}add;

void printsd (add adr);
   
    int main(){
    add adr[5];
    printf("Enter the house No. of 1st person :");
    scanf("%d",&adr[0].houseNo);
    scanf("%d",&adr[0].block);    
    scanf("%s",adr[0].city);
    scanf("%s",adr[0].state);

   
    printf("Enter the house No. of 2st person :");
    scanf("%d",&adr[1].houseNo);
    scanf("%d",&adr[1].block);    
    scanf("%s",adr[1].city);
    scanf("%s",adr[1].state);


   
    printf("Enter the house No. of 3st person :");
    scanf("%d",&adr[2].houseNo);
    scanf("%d",&adr[2].block);    
    scanf("%cs",adr[2].city);
    scanf("%s",adr[2].state);

    printf("Enter the house No. of 4st person :");
    scanf("%d",&adr[3].houseNo);
    scanf("%d",&adr[3].block);    
    scanf("%s",adr[3].city);
    scanf("%s",adr[3].state);

   
    printf("Enter the house No. of 5st person :");
    scanf("%d",&adr[4].houseNo);
    scanf("%d",&adr[4].block);    
    scanf("%s",adr[4].city);
    scanf("%s",adr[4].state);

   
    printsd(adr[0]);
    printsd(adr[1]);
    printsd(adr[2]);
    printsd(adr[3]);
    printsd(adr[4]);

    return 0;

    }

      
    void printsd(add adr) {
        printf("address is : %d , %d , %s, %s,",adr.houseNo,adr.block,adr.city,adr.state);
    }






AVI.PARADOX..

Welcome to my blog! My name is PARADOX, and I’m thrilled to have you here., From the first “Hello, World!”.As a passionate coder, I find joy in the logic and structure of coding., This blog is more than just a collection of articles. It’s a community for those who love to gain knowledge as much as I do., So whether you’re here to learn something new, share your own knowledge, or just to be part of the community, I’m glad you’re here.

Post a Comment

Previous Post Next Post

Contact Form