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

In the DOS enveronment, normal RAM that resides beyond the 1mb mark. a) expanded memory b) swapped memory c) Extended memory d) none

0 Answers  


How many types of operators are there in c?

0 Answers  


char *p="name"; printf(p);

1 Answers  


In scanf h is used for

4 Answers   BFL,


please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code

0 Answers   Mind Tree,






Do pointers store the address of value or the actual value of a variable?

0 Answers   Fidelity,


Explain how can I convert a string to a number?

0 Answers  


What is dynamic memory allocation?

0 Answers  


int array[]={1,2,3,4,5,6,7,8}; #define SIZE (sizeof(array)/sizeof(int)) main() { if(-1<=SIZE) printf("1"); else printf("2"); }

2 Answers   Vector,


Give the logic for this #include<stdio.h> #include<conio.h> void main() { clrscr(); int a=10,b; b=++a + ++a; printf("%d", b); getch(); } Output: 24......How?

2 Answers   Accenture,


What are inbuilt functions in c?

0 Answers  


What is the purpose of 'register' keyword in c language?

0 Answers  


Categories