0

Strings

Hello, I have question about how can I get an output with a string like this: Char word1 [71]; Char word2 [11]; Word1: hello you Word2: hu Output: ello yo That means how can I print my output the first word1 without the word2 letters ? Thanks

18th Feb 2020, 5:47 PM
Tariq Faridi
Tariq Faridi - avatar
1 Respuesta
+ 1
hey , use this function to get and display the input in 1st case : scanf("[^\n]",word1); printf("%s",word1); and in 2nd case simply use : scanf("%s",word2); printf("%s",word2);
2nd Jun 2020, 4:49 AM
kiran upase
kiran upase - avatar