Check out example codes for "oop244". It will help you in understanding the concepts better.

Code Example 1

// Compare Two Strings
 // compare_string.c

 #include <stdio.h>
 #include <string.h>

 int main(void)
 {
         char str1[31], str2[31];
         int i, len;

         printf("Enter first string  : ");
         scanf("%30[^\n]%*c", str1);
         printf("Enter second string : ");
         scanf("%30[^\n]%*c", str2);
         if (strcmp(str1, str2) < 0)
                 printf("%s precedes %s\n", 
                  str1, str2); 
         else if(strcmp(str1, str2) > 0)
                 printf("%s follows %s\n",
                  str1, str2);
         else
                 printf("%s matches %s\n",
                  str1, str2);

         return 0;
 }

Learn ReactJs, React Native from akashmittal.com