Strcmpi String Function In C Program


#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
    int n;
    char *a,*b;
    clrscr();
    printf("\nEnter the string 1 :");
    gets(a);
    printf("\nENter the string 2 :");
    gets(b);
    n=strcmpi(a,b);
    if(n>0)
    {
	printf("\nstring 1 is greatest :");
    }
    else if(n<0)
    {
       printf("\nstring 2 is greatest :");
    }
    else if(n==0)
    {
       printf("\nsstring 1 &string 2 are equal :");
    }
    getch();
}

Login To Download Source Code

Leave a Comment:

Login To Comment

List Of Programs


Goto Examples

Operators

Looping

Number Conversion

Pattern Design

Arrays

Matrix Examples

Sorting Examples

String Function

Change Case

String In C

Maths Functions

User Defined Functions

Recursive Functions

Pointer

Structure

File Concept

Calender Programming