Can I use string in switch case in C? – Enpatika
Skip to content
Yeni Enpatika Logo

Enpatika

En Güncel Oyun ve Sistem Gereksinimleri Sitesi

  • Ana Sayfa
  • Gizlilik Politikası
  • Telif Hakları
  • İletişim
  • taraftar tv apk

Can I use string in switch case in C?

Can I use string in switch case in C?

1 April 2022 Enpatika.com Genel

No you can’t . The case labels of a switch need to be compile time evaluable constant expressions with an integral type.

Read more

Can we use string value in switch case?

1 April 2022 Enpatika.com Genel

It is recommended to use String values in a switch statement if the data you are dealing with is also Strings . The expression in the switch cases must not be null else, a NullPointerException is thrown (Run-time). Comparison of Strings in switch statement is case sensitive.

Read more
WordPress Theme: Gridbox by ThemeZee.