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

print the table 5 in loops

3 Answers  


What is the need of structure in c?

0 Answers  


Can you please explain the difference between syntax vs logical error?

0 Answers  


write a program that will print %d in the output screen??

9 Answers   Infosys,


Who is invented by c?

24 Answers   Infosys, Mphasis,


What are the disadvantages of c language?

0 Answers  


what is the difference between class and unio?

0 Answers   HCL, Wipro,


what is the output of the following program and explain the answer #include<stdio.h> exp() { main(5) } main(int a) { printf("%d",a); return; }

3 Answers   Satyam,


what is the use of macro program

1 Answers   TCS,


why we need function pointers?

3 Answers  


Is fortran still used today?

0 Answers  


If we have an array of Interger values, find out a sub array which has a maximum value of the array and start and end positions of the array..The sub array must be contiguious. Take the start add to be 4000. For Ex if we have an array arr[] = {-1,-2,-5,9,4,3,-6,8,7,6,5,-3} here the sub array of max would be {8,7,6,5} coz the sum of max contiguous array is 8+7+6+5 = 26.The start and end position is 4014(8) and 4020(5).

5 Answers   Microsoft, Motorola,


Categories