概述
分析
实现strcmp(str1,str2)
strcmp()字符串比较函数
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
int
my_strcmp( const char* str1,const char* str2)
{
assert(str1!=NULL);
assert(str2!=NULL);
while(*str1== *str2)
{
if(*str1=='
实现strcmp(str1,str2)
strcmp()字符串比较函数
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
int
my_strcmp( const char* str1,const char* str2)
{
assert(str1!=NULL);
assert(str2!=NULL);
while(*str1== *str2)
{
if(*str1=='