文件名称:projecttwo
下载
别用迅雷、360浏览器下载。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
介绍说明--下载内容均来自于网络,请自行研究使用
8.编写一个函数,实现两个字符串的比较,即自己写一个stringcmp 函数:stringcmp(s1,s2)。如果s1=s2,返回置为0;如果s1≠s2,返回它们二者第一个不同字符的ASCII码差值(如“BOY“与”BAD“第二个字母不同,”O“和”A”之差为79-65=14);如果s1>s2,则输出正值;如s1<s2,则输出负值,在主函数中输入字符串以及输出上述结果。(要求使用指针实现)- Write a function that compares two strings to achieve, that is to write a function stringcmp: stringcmp (s1, s2). If s1 = s2, return is set to 0 if s1 ≠ s2, returning them both the first difference of different characters in ASCII (such as BOY and BAD different the second letter, O and A the difference is 79-65 = 14) if s1> s2, the output value as s1 <s2, a negative value is output, the input string in the main function and outputs the result. (Requires the use of pointers)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
projecttwo.doc