#include<stdio.h>
#include<string.h>
int main()
{
const char *x="memm";
const char *y="mmea";
int c;
c=strcmp(x,y);
if(c==0) {printf("0\n");}
if(c<0) {printf("-1\n");}
if (c>0) {printf("1\n");}
}
Have a Read!
Hi Everyone.
The idea for this page is to provide new c users simple c tutorials to learn how to develop the logic and more importantly correct way to write syntax.
ENJOY !!!
Sunday, February 6, 2011
How to use strcmp
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment