Computer Science, asked by vihangaravishka30, 6 days ago

write a C program to read the address of a person in a single line and display the address in each line based on the symbol ",".​

Answers

Answered by bittuvinit1508
2

Answer:

भाई बहन मुझे नहीं बताया क्या होता है लेकिन lekin aap apni DP mein bahut acche lag rahe ho

Answered by dreamrob
1

Program:

#include<stdio.h>

#include<conio.h>

#include<string.h>

int main()

{

char address[100];

printf("Enter the address : ");

fgets(address, sizeof(address), stdin);

for(int i = 0 ; i < strlen(address) ; i++)

{

 if(address[i] != ',')

 {

  printf("%c" , address[i]);

 }

 else

 {

  printf("\n");

 }

}

return 0;

}

Output:

Enter the address : Modern Academy,Viram Khand-5,Gomti Nagar,Lucknow-10

Modern Academy

Viram Khand-5

Gomti Nagar

Lucknow-10

Similar questions