comparing strings

 #include <stdio.h>

#include<string.h>
int main(){

char st1[]= "Anchal";
char *st2="Anchal";
int val= strcmp(st1,st2);
printf("%d",val);
 return 0;
}

Comments

Popular posts from this blog

snake game Version-2 (using random number)

allocating dynamic memory using calloc

store a table in dynamic array and then change the size of array dynamically to store more numbers