C Programming Tutorial – 35: The Switch Statement

Switch offers a pretty cool way of making decisions in your programs, it is an alternative to if-else statement and is the final decision making construct we are going to check out in this course.

Comments

jmichaelrout says:

For the multiplication and divisions cases, you forgot to change the operation. They both say “a-b”. Just thought I’d point that out. :p

Sadia Khan says:

I did exactly the same way but it’s not running… Why?

Aayush Gupta says:

Well if I take input from user using scanf(“%d%d”,&a,&b);
It didn’t work
It just take me to the invalid input rather than asking me for the operator

Shailesh Kumar shetty says:

u r the best

Saniya Shoeb says:

Hey, what if I ask the user to give values of a & b? Will switch case still work?

Shailesh Kumar shetty says:

this is not the bad tutorial

agyness155 says:

These series of videos are the best tutorial for C programming, clear and concise! Thanks a lot!

Pramod Keshav says:

One of the best channels for learning programming. I perfectly understood what I couldn’t understand in class…

 Write a comment

*

Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!