Write a program to compare two strings without using the
strcmp() function
Answers were Sorted based on User's Feedback
Answer / sriramaraju
#include<stdio.h>
main()
{
//please read two strings int str1 and str2//
while(str1[i]!='/0' &&str2[i]!='/0')
if(str1[i]!=str2[i])
flag=1;
if(flag==1)
printf("equal");
}
| Is This Answer Correct ? | 127 Yes | 216 No |
I need a sort of an approximate strcmp routine?
What are the advantages of c preprocessor?
What are the types of type specifiers?
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
What is c mainly used for?
where can function pointers be used?
what is difference between ++(*p) and (*p)++
17 Answers Accenture, HCL, IBM,
Is main() function predfined or userdefined?
Can I initialize unions?
What is openmp in c?
Write a program to exchange two variaables without temp
If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402