Write a program to compare two strings without using the
strcmp() function
Answer Posted / 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 |
Post New Answer View All Answers
Can a local variable be volatile in c?
What is difference between class and structure?
What is the function of this pointer?
Why do we need a structure?
What is the difference between NULL and NUL?
What is modeling?
What is file in c preprocessor?
Differentiate between the expression “++a” and “a++”?
Can you assign a different address to an array tag?
c program to compute AREA under integral
I completed my B.tech (IT). Actually I want to develop virtual object that which will change software technology in the future. To develop virtual object what course I have to take. can I any professor to help me.
Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?
What is the correct declaration of main?
What is a substring in c?
Explain how can I prevent another program from modifying part of a file that I am modifying?