C++ Switch Statement

Subscribers:
50,600
Published on ● Video Link: https://www.youtube.com/watch?v=VKlSWvSS7JI



Duration: 9:49
200 views
8


C++ Switch Statement. In this video, you will learn how to use a switch statement for comparing values instead of using an if/else condition statement. With a switch statement, at compile time, a jump table/look up table is created, which maps each case value. With the table, C++ will jump to the case that matches the value. This is much more performant than an if/else statement, where we need to check each individual if statement until we hit our condition. This is known as the if/else ladder.

In addition, you will learn how to group switch cases together and use the break statement to exit the switch case code blocks.

C++ Playlist:
https://www.youtube.com/playlist?list=PLnKe36F30Y4ZDNIOZ51sX25pWKQ1pkpTE

Subscribe for more coding tutorials 😄!







Tags:
c++ switch
c++ switch case
c++ switch statement
c++ switch statements
c++ switch case statement
c++ switch case statements
C++ switch
C++ switch case
C++ switch case statements
C++ switch case statement
C++ switch statement
switch statement in C++
switch statement in c++
switch statement c++
switch statement C++
switch case c++
switch case C++
switch case statement c++
switch case statement C++
switch case statement in c++
switch case statement in C++