The full structure of a C++ program to compare two strings and check whether they are equal
hammy2013 0
Newbie Poster
Recommended Answers
Jump to Post#include <stdio.h> #include <string.h> void main() { char s1[]="abcd",s2[]="xyz"; if(strcmp(s1,s2)) printf("No"); else printf("Yes"); }
All 3 Replies
skaa 0
Light Poster
Lucaci Andrew 140
Za s|n
ddanbe 2,724
Professional Procrastinator Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.