How I use in string varriable in switch case in c language ..... like case"vinay": case"aman" etc?

This can't be done in C. Kernighan & Ritchie section 3.4 begins: "The switch statement is a multi-way decision which tests whether an expression matches one of a number of constant integer values, ...". This means that neither variables or non-integer types can be used in case statements.As strings are not integers, they can't be used in case statements.

Its rather simple, for example you can list various options for case together and when any of those is met it'll execute the command (case a/case A example)Default will work for any option not listed within switch, it isnt required though. If you don't end it with break; it'll automatically move on to the next case wether its met or not from the first case.(If variable is B it'll work with the statement on B and on defaultVariable may only be an integer or a stringswitch(int/char var) { case a: case A: A(This); break; case B: B(This); default: others(this):}Hope this answers your question :).

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions