Tag: strcmp()

12
May
2017

strcmp() explained perfectly

code: #include<stdio.h> #include<string.h> int main() { char first[90]=”abc”; char second[80]=”cat”; int i; i=strcmp(first,second); if(i==0) printf(“Both are equal\n”);…

28
Dec
2015

c library function strcmp()

http://www.cplusplus.com/reference/cstring/strcmp/ http://www.tutorialspoint.com/c_standard_library/c_function_strcmp.htm for the pseudocode: http://stackoverflow.com/questions/12136329/how-does-strcmp-work http://en.cppreference.com/w/c/string/byte/strncmp example: #include<string.h> #include<stdio.h> demo(const char* lhs,const char* rhs) { int rc=strcmp(lhs,rhs);…