Question #45069

If the user enters the input as my name is sai i want to display the output as "my" "name" "is" "sai"
please give me the program in C

Expert's answer

Answer on Question #45069, Engineering, Other

Question:

If the user enters the input as my name is sai i want to display the output as "my" "name" "is" "sai"

please give me the program in C

Answer:

#include <stdio.h>

int main(void)

{

char input[100];

printf ("Enter something\n");

scanf("%[^\n]s",input);

printf("%s\n", input);

return (0);

}

http://www.AssignmentExpert.com/</stdio.h>


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS