Can I use string in switch case C?

No you can’t . The case labels of a switch need to be compile time evaluable constant expressions with an integral type. But int literals like ‘+’ satisfy that requirement.

Sizin İçin Seçtik  Can switch-case be used for all data types?

Leave a Reply

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

Can I use string in Switch Case C++?

You cannot use string in either switch or case .17 Mar 2018

Sizin İçin Seçtik  Can you use && in switch case?

Leave a Reply

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