Click here to Skip to main content
15,895,084 members

Comments by Navid Rigi Ebrahimi (Top 11 by date)

Navid Rigi Ebrahimi 12-Feb-23 8:42am View    
yeah, i know. i wrote sth to print all the chars below space, but no luck in null, which is a non-printable, like \n or \t or others.
Navid Rigi Ebrahimi 12-Feb-23 6:57am View    
Allowed functions : write
• Create a function that displays a string of characters onscreen. If this string contains characters that aren’t printable, they’ll have to be displayed in the shape of
hexadecimals (lowercase), preceeded by a "backslash".
• For example :
Coucou\ntu vas bien ?
• The function should display :
Coucou\0atu vas bien ?
• Here’s how it should be prototyped :
void ft_putstr_non_printable(char *str);
Navid Rigi Ebrahimi 12-Feb-23 5:07am View    
Yeah, it's the only way. Thanks a lot man.
Navid Rigi Ebrahimi 12-Feb-23 5:06am View    
All you said is correct and I know it, but as I said, it's in a question. It asks us to print those control characters.
Navid Rigi Ebrahimi 12-Feb-23 4:01am View    
Yeah, exactly but I have no idea how to fix it. Even sizeof doesn't work because first one refers to array but second one to pointer.