Search
 
SCRIPT & CODE EXAMPLE
 

C

see if two strings are equal in C

#include <stdio.h>
#include <string.h>
int main(int argc, char const *argv[]) {
   char string1[] = {"tutorials point"};
   char string2[] = {"tutorials point"};
   //using function strcmp() to compare the two strings
   if (strcmp(string1, string2) == 0)
      printf("Yes 2 strings are same
");
   else
      printf("No, 2 strings are not same
" );
      return 0;
}
Comment

check if string is the same c

#include <stdio.h>
#include <string.h>
int main(int argc, char const *argv[]) {
   char string1[] = {"tutorials point"};
   char string2[] = {"tutorials point"};
   //using function strcmp() to compare the two strings
   if (strcmp(string1, string2) == 0)
      printf("Yes 2 strings are same
");
   else
      printf("No, 2 strings are not same
" );
      return 0;
}
Comment

PREVIOUS NEXT
Code Example
C :: prime numbers c 
C :: windeployqt example 
C :: addition of two matrix in c 
C :: populate a map c++ 
C :: Succ de ch 
C :: how to find sum of two nums 
C :: libdvd-pkg: `apt-get check` failed 
C :: C how to find substring in string 
C :: c language append line to file 
C :: c bit access struct 
C :: print bool c 
C :: how to create calculator with switch in c 
C :: c random array 
C :: check if string in string c 
C :: Array Input/Output in C 
C :: PATH_MAX 
C :: set value of boolean in c 
C :: ruby find object in array by attribute 
C :: isspace 
C :: c/c++ windows api download file 
C :: bootsrap textbox 
C :: doble puntero en c 
C :: linked list using c 
C :: casting in c 
C :: apt-mark remove hold 
C :: lxc Failed to load config for 
C :: yum install supervisor amazon linux 
C :: compile multiple c files 
C :: writing structures in c 
C :: use frama c online 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =