C program for compare two strings , C/C++ Programming

Assignment Help:

void main()

{

          char n[100],n1[100];

          int i,j;

          clrscr();

          printf("ENTER THE FIRST STRING: ");

          scanf("%s",n);

          printf("ENTER THE SECOND STRING: ");

          scanf("%s",n1);

          for(i=0,j=0;n[i]!='\0';i++)

          {

                   if(n[i]!=n1[i])

                   j=1;

          }

          if(j==0)

          printf("THE TWO STRING ARE EQUAL");

          else

          printf("THE TWO STRING ARE NOT EQUAL");

          getch();

}

 


OUTPUT :

ENTER THE 1 STRING: KAMLESH

ENTER THE 2 STRING: KAMLESH

 

THE TWO STRING ARE EQUAL

 


Related Discussions:- C program for compare two strings

I need csgo wallhack and human aimbot, I need CSGO Wallhack and Human Aimbo...

I need CSGO Wallhack and Human Aimbot Project Description: Need a CSGO hack which can ESP Wallhack and Aimbot realistically. Must be VAC Proof, and ESL proof, as wel

Define a procedure called make-avl-tree, This question deals with AVL trees...

This question deals with AVL trees. The representation to be used is similar to the bank account object discussed in class. (a) Define a procedure called make-avl-tree which mak

Flow chart, given number is prime or not

given number is prime or not

Source code, I hv an assignment to do, I almost done. But i cant find whats...

I hv an assignment to do, I almost done. But i cant find whats wrong- my code is to make a simple calculator using function''s all 4 patterns. I did like this- #include int add

Determine the capacitor voltage by c program, Write a program to determine ...

Write a program to determine V c for a given value of time (t)   #include stdio.h #include math.h void main() {      char prompt;   float vs,cr,t,vc;   /* input time */

What are arrays, What are Arrays? Numerous applications require the pro...

What are Arrays? Numerous applications require the processing of multiple data items that have identical characteristics. In such circumstances it is frequently convenient to p

Program to calculate the average sales for each employee , There are 2...

There are 25 employees in a business. Each employee has 5 sales each day of the month (Assume there are 30 days in each month of the year). Draw a flowchart for a pr

Define functions with arguments and no return values, Define Functions with...

Define Functions with arguments and no return values The calling function will read a data from the terminal and pass it on to called as function and this will work good as the

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd