answersLogoWhite

0

"It's not just a good idea. It's the law!

In C, switch's and strings don't mix.

Use:

if (!strcmp(myval, "S1") {...}
else if (!strcmp(myval, "S2") {...}

etc"

--
ptrussell_nc
http://www.sqaforums.com/showflat.php?Cat=0&Number=473868&Main=473575


User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

How you can convert from string to int in C language?

Use the atoi() or atol() function.


What is literal in c language?

a string constant


Why to use String in c?

C doesn't have String data-type, so don't use it.


What symbol is use to join strings?

Language dependent. In C, for example, there no string as such, but you can use function strcat to concatenate zero-terminated character-sequences.


C plus plus library functions for string operations?

You can use "string" class in C++ for string operations or you may use c style string functions as well. #include <string> String class in C++ provides all basic function to operate on strings. you may details descriptin at http://www.cplusplus.com/reference/string/string/


Special character in C language?

special character in c language are as follows~ ' ! @ # % ^ & * () _ - + = | \ {} [] : ; " <> , . ? /


Definition of buffer in assembly language?

its just like a string of c++


Why you are use to c language?

I do use am a programmer, because C-language.


What are the notes on how to play can can on the violin?

:D string: D D E G F E switch to a string: A A A B switch to d string: F G E E E G F E D : switch to a string: D C B A 1ST ENDING- switch to a string: D C B A switch to d string: G F E 2ND ENDING- d string: D switch to a string: A switch to d string: E F D D D D E G F E A A A B F G E E E G F E D D C B A G F E D D E G F E A A A B F G E E E G F E D A E F D D


How print the string with double cot in c plus plus language?

console.wrikerle("""");


What is the use of Reverse String in C program?

The use of the reverse string in C program is used to reverse the letters in the string. An example would be reverse me would be reversed to em esrever.


What is the mean of switch in c language?

switch is a mechanism provided in the C language through which we can select one among various constant option based on value of a single event.