boost learn study
Friday, March 28, 2014
stcmp() - String Handling Functions
/*Write a program to compare two string*/ #include
#include
#include
void main() { char name1[10], name2[10]; int i=0; clrscr(); printf("Enter the two Names:\n"); scanf("%s%s",name1,name2); i = strcmp(name1,name2); if(i==0) { printf("Both String are equal"); } else { printf("Both String are not equal"); } getch(); }
Output is as :
Enter the two Names
Bintu
Chaudhary
Both String are not equal
Read more �
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment