摘要: ;本程序功能是实现:随机产生一系列的ascii码字符,将其分类输出DATAS SEGMENT ;此处输入数据段代码 Str1 db 'Please input a number:','$' Str2 db 'output the number:','$' Str3 db 'output the capital word:','$' Str4 db 'output the small word:','$' Str5 db 'output the other:&# 阅读全文
posted @ 2012-12-09 00:35 linuxhan 阅读(479) 评论(0) 推荐(0) 编辑
摘要: 本文是自己结合平时所学的知识,对sizeof和strlen的区别进行了总结,如有不对的地方还请批评指证,共同进步!!!一、从C语言的定义上来讲1、sizeof是关键字,而strlen是包含在string.h头文件中的一个字符串函数2.sizeof操作符的结果类型是size_t,它在头文件中的typedef为unsigned int 类型,该类型保证能容纳实现所建立的最大对象的字节大小。而string函数的返回类型是整形,返回的是字符串的起始到第一个‘NUL’的所占字节的个数3.sizeof可以用类型做参数,strlen只能用char*做参数,且必须是以”\0”结尾的。4.大部分编译程序在编译的 阅读全文
posted @ 2012-12-09 00:27 linuxhan 阅读(289) 评论(0) 推荐(0) 编辑