write a progam to compare the string using switch case?



write a progam to compare the string using switch case?..

Answer / 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

More C Interview Questions

What is struct node in c?

0 Answers  


What does the characters “r” and “w” mean when writing programs that will make use of files?

0 Answers  


i want to make a program in which we use input having four digits(4321) and get output its reciprocal(1234).

1 Answers  


Read two numbers from keyboard and find maximum of them?

1 Answers  


An arrangement of information in memory in such a way that it can be easily accessed and processed by a programming language a) string b) data structure c) pointers d) array

0 Answers  






What is c token?

0 Answers  


How do I declare an array of N pointers to functions returning pointers to functions returning pointers to characters?

2 Answers  


a formula,a series of steps,or well defined set of rules for solving a problem a) algorithem b) program c) erdiagram d) compiler

0 Answers  


What is sizeof return in c?

0 Answers  


Reverse a string word by word??

9 Answers  


write a c program to find the probability of random numbers between 1-1000

0 Answers   ADS,


Where are some collections of useful code fragments and examples?

0 Answers   Celstream,


Categories