oop244
// 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;
}
Also in C:
- bootsrap textbox
- Ionic 3 camera plugin not returning video from photo library on ios
- print double with 2 decimals c
- fgets langage c
- amazon kinesis disaster recovery
- select all file from date powershell
- pebble scripting Boolean expression
- get chunks of a mp4 in ffmpeg
- lazer codechef
- 4k stogram chave
- pi in c language
- blockchain implementation
- cloudflare dns
- how to add to the end of a linked list
- c program to arrange numbers in descending order
- concatenate two strings in c
- how do pointers work in c programmwiz
- keras conv2d batchnorm
- fwrite c
- what is strikethrough in markdown
- #include<stdlib.h>
- c how to define a variable
- binary search time complexity
- #pragma pack(1) in c