zoukankan      html  css  js  c++  java
  • 课上程序的补充

    #include<stdio.h>
    #include<stdlib.h> void funstr(char *s) { while(*s!='') { printf("%c",*s); s++; } } int main() { char str[]="hello world"; str[0]=str[0]-32; str[6]=str[6]-32; funstr(str); return 0; }
    Hello World
    --------------------------------
    Process exited after 0.1586 seconds with return value 0
    请按任意键继续. . .

    结论: 1、上节课因为忘记以前的知识,所以一直在查以前的知识,搞得脑子凌乱,没有把funstr函数与主函数连起来。

                2、课下主要补充了以前的知识,并询问了舍友这道题的解答,虽然脑子比较笨,最后还是看了答案,但勉强还是理解了。

                3、主函数设了str数组,把里面的【0】和【6】用ASCII代码换成大写并进入funstr函数;而另外设的funstr函数用定义指针的形式来判断是不是符合输出。

  • 相关阅读:
    PHP实现带有验证码的登陆注册
    XML
    自定义注解--Annotation
    URL编程
    SpringMvc表单标签库
    Socket编程
    网络编程
    其他流
    Spring MVC-视图解析器
    IDEA(JAVA)使用json
  • 原文地址:https://www.cnblogs.com/wengweng/p/6650888.html
Copyright © 2011-2022 走看看