stcmp() - String Handling Functions C Programming /*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 » Tweet Share Share Share Share Related Post
ConversionConversion EmoticonEmoticon