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  Dogenin hedefi nedir?

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  Where can I stake Litentry?

Leave a Reply

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