Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
what is the difference between these statement
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="ashu, post: 5021666"] Dear friends, i am trying to solve one question about word counting and i am surprise by statement behaviors, actully i want to check if is a character not a space,tab or newline, i am not giving full code. 1st statement : if(c==' '|| c=='\n' || c== '\t') {then go to next character } else ( increase no of word} it checks if character is a space,tab or newline and i will do nothing with it.else i increase no of word. works fine 2nd statement : if(c!=' '|| c!='\n' || c!='\t') { increase no of word} i want to directly check if not a space,tab or newline but this statement is doing nothing , why? example : this is a test statement 1st works fine returns 2 but statement 2nd does nothing. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
what is the difference between these statement
Top