write a progam to compare the string using switch case?

Answer Posted / kishore kumar naik p

switch(strcmp(str1,str2))
{
case 0: printf("\nBoth are equal"); break;
default:
printf("\nBoth are not equal");
break;
}

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are pointers? What are different types of pointers?

835


Explain which function in c can be used to append a string to another string?

846


What is the stack in c?

896


typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none

986


What is meant by operator precedence?

886


Explain argument and its types.

805


Why is #define used?

1027


What are loops in c?

785


How many parameters should a function have?

890


Explain what is dynamic data structure?

901


What does the && operator do in a program code?

962


What are the advantages of using new operator as compared to the function malloc ()?

1074


Is linux written in c?

806


What is the use of header files?

839


What is the usage of the pointer in c?

852