C Strings 27: Print only the string before new line character [C Programming]

Опубликовано: 21 Октябрь 2024
на канале: JLabs
2,803
42

Write a program in C to print only the string before new line character.

Note : isprint() will only print line one, because the newline character is not printable.

Expected Output :
Input (embedded in code):
The quick brown fox \n jumps over the \n lazy dog. \n
Result:
The quick brown fox.

=================================================

   • C Programming - Strings  

Website : http://www.jlabstech.com
Like us on Facebook :   / jlabstechnology  
Follow on Twitter :   / _jlabs_