Answer Posted / karthikeyan n p
#include<stdio.h>
#include<conio.h>
void main()
{
char st1[10],st2[10];
int i,sl1=0,sl2;
clrscr();
printf("\nEnter String1:");
scanf("%s",st1);
printf("\nEnter String2:");
scanf("%s",st2);
for(i=0;st1[i]!='\0';i++)
sl1=sl1+1;
for(i=0;st2[i]='\0';i++)
sl2=sl2+1;
if(sl1!=sl2)
{
printf("\nString is not equal.");
}
else
{
for(i=0;st1[i]!='\0' || st2[i]!='\0';i++)
{
if(st1[i]!=st2[i])
{ f=1; }
}
if(f==1)
printf("\nString is not equal.");
else
printf("\nString is equal.");
}
getch();
}
Is This Answer Correct ? | 1 Yes | 5 No |
Post New Answer View All Answers
please explain every phase in the "SDLC" in the dotnet.
What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?
WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?
Wt are the Buses in C Language
can we implement multi-threads in c.
What are enums in c?
What is the significance of an algorithm to C programming?
How to explain the final year project as a fresher please answer with sample project
How can a string be converted to a number?
How do you print an address?
What is hash table in c?
When should the volatile modifier be used?
#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }
What does malloc () calloc () realloc () free () do?
What is getch () for?