Skip to main content

Posts

Showing posts with the label ||

C++ if else && | | Operator

Animated Gif Array in function Parameter C++ if ( && , || ) else if else know as Decision making statement because it's depend on given condition . As we discussed earlier about variables and different data types, there is slight difference of comparing int values and string values. Every condition depends on values of variables and we use if statement to compare those values to execute the specific part of code. we use nested if else to add more check points in our program. Every condition return only two states ' true ' and ' false ' it's bool data type in c++. if condition depends on these conditions if condition is true then it'll execute if condition body code. if condition is false then it'll skip if body code. else execute only when if condition is false . Syntax of if else statement is very simple if ( condition ) { //body of if } else{ } it's one line if else syntax. int y = 10 ; string var...