Sunday, January 16, 2022

String Compare in C++

 A program that demonstrates how to use the string compare function of the C++ programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.


My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.






Program Listing


#include <iostream>

#include <cstring>


using namespace std;


int main()

{

char str1[100]="Computer";

char str2[100]="Computer";

cout <<"\n";

cout << "\tString Compare in C++";

cout <<"\n\n";

if(strcmp(str1,str2)==0)

   cout<<"\tThe result is true."<<endl;

else

  cout<<"\tThe result is false.\n";

cout <<"\n";

cout << "\tEnd of Program";

cout <<"\n";

}


No comments:

Post a Comment