Conditional Operator in C++ | C++ Conditional Operator - C++ Tutorial 26

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ส.ค. 2020
  • Notes for You:: Conditional Operator in C++.
    - is the ternary operator in C++.
    - It accepts 3 operands.
    (operand1) ? operand2 : operand3;
    Where:
    operand1: must be a condition
    operand2: value1 // true part
    operand3: value2 // false part
    Example:
    - Program to find the given number is even or odd.
    #include <iostream>
    using namespace std;
    int main()
    {
    int num = 15;
    cout << num << " is " << ((num%2==0) ? "even" : "odd") << endl;
    return 0;
    }
    Note:
    - replace < with less-than symbol.
    - replace > with greater-than symbol.
    =========================================
    Follow the link for next video:
    In this C++ Tutorial you understand the Difference Between the Decimal and Binary Number Systems.
    • Binary vs Decimal Numb...
    Follow the link for previous video:
    C++ Tutorial 25 - Increment and Decrement Operators in C++ - Part 2
    • Increment & Decrement ...
    =========================================
    C++ Tutorials Playlist:
    • C++ Tutorials
    =========================================
    Watch My Other Useful Tutorials:-
    C# Tutorials Playlist:-
    • C# Tutorials
    Java Tutorials Playlist:-
    • Java Tutorials
    C Programming Tutorials Playlist:
    - • C Programming Tutorials
    C Practical LAB Exercises Playlist:-
    • C Practical Programs
    =========================================
    ► Subscribe to our TH-cam channel:
    / chidrestechtutorials
    ► Visit our Website:
    www.chidrestechtutorials.com
    =========================================
    Hash Tags:-
    #ChidresTechTutorials #CPlusPlus #CPlusPlusTutorial #CPP #CPPTutorial

ความคิดเห็น • 16

  • @ChidresTechTutorials
    @ChidresTechTutorials  3 ปีที่แล้ว +1

    Once you watch the video; answer the following questions:
    1. Explain conditional operator in c++

  • @senthilkumar_ask6240
    @senthilkumar_ask6240 3 ปีที่แล้ว +2

    Sir please please complete all the topics in c++

  • @monikdiwani1379
    @monikdiwani1379 ปีที่แล้ว +1

    Very good sir

  • @rabiakainat5850
    @rabiakainat5850 3 ปีที่แล้ว +1

    Thanku sir

  • @albitbiju3739
    @albitbiju3739 3 ปีที่แล้ว +2

    Sir,when the remaining part comes especially about loops

    • @ChidresTechTutorials
      @ChidresTechTutorials  3 ปีที่แล้ว +1

      Soon Albit Biju

    • @homeaccount3960
      @homeaccount3960 2 ปีที่แล้ว

      It's been 1 year since that message. I think he isn't active on TH-cam anymore!

  • @bm._2am634
    @bm._2am634 3 ปีที่แล้ว +1

    Hi, can this question be solved
    write oop find result x!+power(x,y) if x in class a and y in class b ?

  • @LaxmiDevi-ls6id
    @LaxmiDevi-ls6id 3 ปีที่แล้ว +1

    Sir please aap mujy ye sb hindhi mai smjha doge .....apke notes bhutt best hai pr mujy hindhi mai smjha do ye please

  • @shehrozdurrani4967
    @shehrozdurrani4967 2 ปีที่แล้ว +1

    sir it gives me error after running it in visual code studio
    plz sir help me plz as soon as posible that i continue another remaining course from your playlist
    thank you
    #include
    using namespace std;
    int main() {
    int Mynum = 7
    cout