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 factorization of factorials using c 
C :: ** in c 
C :: c programming language 
C :: How to Convert double to int in C 
C :: simple calculator, using switch statement in C 
C :: bootstrap form 
C :: bash get load average 
C :: delete string function in c 
C :: c check if character is an alphabet 
C :: declare variables arduino 
C :: gcd and lcd in c 
C :: unsigned char c programming 
C :: C - program to create 1D array 
C :: stdio.h 
C :: imprimir matriz 
C :: chevront de vlavier 
C :: fahrenheit to celcius 
C :: algorithm for dequeue 
C :: working outside of application context 
C :: relational operators in c 
C :: objects in oops 
C :: north austin weather 
C :: allintext:christie kiser filetype:log 
C :: parcel-builder put image in sub folder 
C :: <fileset joomla 
C :: convert calendar time to epoch in c programming 
C :: code_art_bcm_10.c 
C :: YOUNG SEX PARTY underground collection 
C :: suma de digitos 
C :: variadic macros in c 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =