c==('\n') || ('\t') ||(' ')

956 views
Skip to first unread message

Manor Perets

unread,
Sep 19, 2012, 1:20:10 PM9/19/12
to bc...@googlegroups.com, Professor David Arnow
I couldn't figure out this problem and I'd appreciate some direction.

Assume that c is a char variable that has been declared and already given a value. Write an expression whose value is true if and only if c is what is called a whitespace character (that is a space or a tab or a newline-- none of which result in ink being printed on paper).
I tried the following but it didn't work. I think the ' ' is not working for me because it evaluates to TRUE also for other characters.
c==('\n') || ('\t') ||(' ')

Thanks,
Manor

ar...@panix.com

unread,
Sep 19, 2012, 1:24:25 PM9/19/12
to Manor Perets, bc...@googlegroups.com
Hugely important issue!!!
Raise it in class today.
(no, it isn;t on the quiz :) )
Reply all
Reply to author
Forward
0 new messages