Hi all,
Is there any way by which we can compare strings using switch-case method?
Or will we have to use only if-else?
The following code gives error & which is perfect because swtch expects an integer and not any string.
you are completely wrong my friend!!Switch case has nothing to do with what you have come up with!!You have to call strcmp() ,store the reutrn result and then call switch using that integer variable.