C Language - String as a Header File
#include <stdio.h>
#include <conio.h>
#include <string.h>
int main()
{
char str1 [] = "Shan \n";
char str2 [] = "Ali";
char str3 [50];
// puts (strcat (str1, str2));
// printf ("\n");
// printf ("the length of str1 is %d \n", strlen(str1));
// printf ("the length of str2 is %d \n", strlen(str2));
// printf ("the reversed function of str1 is here: \n");
// puts (strrev(str1));
// printf ("\n");
// printf ("the reversed function of str2 is here: \n");
// puts (strrev(str2));
// strcpy (str3, strcat(str1,str2));
// puts(str3);
printf ("the strcmp value of function str1 and str2 is %d", strcmp(str1, str2));
return 0;
}
// ScreenShots:
Comments
Post a Comment