C Programming Tutorial – 10 – Logical Operators

[ad_1]
Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –


Posted

in

by

Tags:

Comments

37 responses to “C Programming Tutorial – 10 – Logical Operators”

  1. David Pera Avatar

    Hey bud, are you able to combine && and || in a single if statement while using a strcmp as well. ex.
    if ( x >= y ) && ( r <= 10 ) && ( val1 >= 3.5 ) == 0 && ((strcomp( w == 'y' || t == 'y'));
    printf("Sounds Goodn");

  2. Tania sri Avatar

    plZz post the correct logic of c programming

  3. Ladeza Adrian Avatar

    Thank you . you save my life

  4. Laurelindo Avatar

    4:26
    "If you hold in shit…"

  5. sad ahmed Avatar

    thanks for this lessons friends

  6. ProjektPlay Avatar

    i've 9 toes i find this offensive :/

  7. torres dominguez Avatar

    oh gawd for once a short specific tutorial

  8. PewDiePie Avatar

    I have 11 toes dude I was born with it, it's not my fault I feel hurt unsubbing 🙁

  9. OAKZD1 Avatar

    what about !(a&&b)

  10. Gabriel Badiola Avatar

    I have 49081 eyes ._.

  11. Abdel Ouery Avatar

    Funny eyes and toes

  12. Taha Akhter Avatar

    Please do the tutorials on arrays(1D and 2D) and functions please your tutorials are really helpful Thanx alot so far…….

  13. iason s Avatar

    I haven't used  #include <conio.h> or getch<>;  in any of the tutorial programmes and it's working perfect, what's their use.

  14. ac989 Avatar

    Those little "up and down lines" are called pipes. Just sayin'.

  15. Pawel Orzlowski Avatar

    It's amazing way of learning C. The books are totally not comparable.
    The progress I made in 1 day of your tutorials is far greater than past weeks of book study. I'm really glad I found your tutorials on web. I got decision to be back of programming after really long break 15 years and this is best way to do it,
    Well done Bucky!!!

  16. ifoxrider Avatar

    i got the code to run, but when i change double ampersand to this ||. I compile and run it again, but i put 2 for eyes and 15 for toes, still got "You are weird" wat did i do wrong. the code still compile

  17. Leo Podstanicky Avatar

    I am weird – it was just an example!

  18. Nake Fame Avatar

    Hey, I have eleven toes and I think it's weird too.

  19. dedededanny Avatar

    As the old saying goes, don't cut off your toes to spite your foot.

  20. dedededanny Avatar

    1) Normal means:"Conforming to a standard; usual, typical, or expected." 99.9% of people have 10 toes and 2 eyes. He's not saying you're bad, just not tipical or expected.
    2) a race is a group such as white, black, etc. not the amount of toes you have.
    3) sure, it must suck missing a toe, but boo hoo, he's not making fun of you, he's giving a helpful tutorial.

  21. Andrew Avatar

    your stupid, your not normal as most people have 10 toes and you don't. I'm not gonna apologize for being a logical person nor will I ever apologize for it. He could have said you are different but he obviously couldn't think of a way to put it so he apologized.

  22. JansProduction Avatar

    Also… are you Adolf Hitler in hiding?

  23. JansProduction Avatar

    Ha! retard. he isnt racist… and being without one toe is kinda weird…

  24. Svetroid Avatar

    How is saying 'you are weird' in a program as an example about a person with 9 toes RACIST? Toes are not of different races.

  25. Tobias Arvidsson Avatar

    You evil human, how can you sleep after telling people they are wierd?

  26. yoci610 Avatar

    BUCKY I LOVE YOU

  27. c99tutorial Avatar

    Possible but better to use parens… if ((cond1 && cond2) || (cond3 && cond4)). Messier but the meaning is clearer.

  28. c99tutorial Avatar

    Comma means to evaluate each expression left to right, but only the last one is considered significant. For example, let a = 5, b = 10. Then (a==0, b==10) is true but (a==0 && b==10) is false.

  29. bilarion Avatar

    You have placed a comma after "eyes == 2". Delete it.

  30. harindersingh jina Avatar

    ISO C++ forbids comparison between pointer and integer……..if(eyes == 2, && toes == 10)
    …..if(eyes == 2, || toes == 10).both are not working……can anyone here can help me regarding this…….thanks in advance……..:D

  31. Hakuna Matata Avatar

    8 people are weird.

  32. noilex Avatar

    hey bucky!

    || = OR

    the "up and down" things are actually called pipes, hence; | = pipe

  33. Siddhant Kiishorre Avatar

    even a ","(without quotes) worked for me instead of "&&"(without quotes).

  34. Sreeraj SJ Avatar

    Is it posssible if(condition1 && condition2 || condition3 && condition4)

Leave a Reply

Your email address will not be published. Required fields are marked *