#include <stdio.h>
int main()
{
//**************3、字符数组**************
char array[] = {'i','P','\0','o','n','e','h'};
for(int i=;i<;i++)
{
printf("%c",array[i]);
}
printf("\n");
//字符数组除了使用for循环之后,还可以使用%s,打印 //当我们用%s去打印字符数组的时候,
//它的原则是从字符数组的第一个字母开始输出
//直到遇见\0终止输出
//如果没有\0,会继续向后输出下一个单元未知的信息。
//如果字符数组中,我们没有手动的添加\0,
//只要长度足够,系统会自动帮我们添加\0
printf("%s\n",array); //字符数组还有一个简单的写法
char str[]="iPhone";
printf("%s\n",str); int a = ;
int length = sizeof(str);
//因为字符数组不写\0的时候系统会自己帮我们添加一个\0
printf("length=%d\n",length); //利用sizeof计算数组的个数
int array1[] = {,,,,,,,,,,,,,,,};
int count = sizeof(array1)/;
printf("count = %d\n",count); return ;
}

#include stdio.h(6)的更多相关文章

  1. 第二次作业#include <stdio.h> int main() { int a,b,c,d,e; printf("请输入一个不多于五位的整数:\n"); scanf("%d",&a); if(a>=100000||a<=0) { printf("输入格式错误! \n"); } else { if(

    1 判断成绩等级 给定一百分制成绩,要求输出成绩的等级.90以上为A,80-89为B,70-79为C,60-69为D,60分以下为E,输入大于100或小于0时输出"输入数据错误". ...

  2. c语言输入与输出库函数#include<stdio.h>

    last modified: 2010-05-28 输入与输出<stdio.h> 头文件<stdio.h>定义了用于输入和输出的函数.类型和宏.最重要的类型是用于声明文件指针的 ...

  3. #include <stdio.h>

    1 fflush 2 fgetc 3 fgets 4 fprintf 5 fputc 6 fputs 7 fscanf 8 fseek 9 ftell 10 perror 11 remove 12 r ...

  4. error: /usr/include/stdio.h: Permission denied 的一种情况分析

    error: /usr/include/stdio.h: Permission denied 的一种情况分析 代码: #include <stdio.h> int main(){ prin ...

  5. #include<stdio.h> #include "stdio.h"

    https://baike.baidu.com/item/#include <stdio.h> #include <stdio.h> 编辑 #include<stdio. ...

  6. #include stdio.h(B)

    #include <stdio.h> int main() { //***********一.循环语句*************** //什么叫做循环: //重复的做某件事情,重复的执行一 ...

  7. #include stdio.h(A)

    /* 第一个*******知识点工程相关信息******** 1.创建工程 文件->新建->工程->win32 console applecation ->文件名不能为汉字 2 ...

  8. #include stdio.h(7)

    #include <stdio.h> int main() { //***********一.循环语句*************** //什么叫做循环: //重复的做某件事情,重复的执行一 ...

  9. #include stdio.h(5)

    #include <stdio.h> int main() { //1.数组的排序-冒泡排序 /* 1.规则:相邻的两个数据进行比较 2.如果有N个数据,需要选择N-1次参照物来比较, 因 ...

随机推荐

  1. P4449 于神之怒加强版

    \(\color{#0066ff}{ 题目描述 }\) 给定n,m,k,计算 \(\sum_{i=1}^n \sum_{j=1}^m \mathrm{gcd}(i,j)^k\) 对1000000007 ...

  2. 最短路【洛谷P3946】ことりのおやつ(小鸟的点心)

    P3946 ことりのおやつ(小鸟的点心) 滑完雪之后,ことり突然想吃点心啦!于是她去了甜品店. 日本的冬天经常下雪.不幸的是,今天也是这样,每秒钟雪的厚度会增加q毫米. 秋叶原共有n个地点,编号从1到 ...

  3. atcoder 2643 切比雪夫最小生成树

    There are N towns on a plane. The i-th town is located at the coordinates (xi,yi). There may be more ...

  4. 牛客寒假算法基础集训营1 D 小a与黄金街道

    链接:https://ac.nowcoder.com/acm/contest/317/D 首先被数学题吓到了.gcd(n,x)==1 那么必定有 gcd(n,n-x)==1 证明略. 并且两个人的对答 ...

  5. vue学习二:

    vue的常用标签: 1.<router-link to=''>主要实现跳转链接功能,属性to='/'即是跳转到path为'/'的路径. 2.v-bind动态绑定指令,格式为:v-bind: ...

  6. 使用Mybatis-plus发生org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):

    容我慢慢说来,之前是使用springboot+mybatis.我一直采用xml配置文件写sql. 后来采用了mybatis-plus之后,在本地上面测试没有一点问题.一放到服务器就发生这种情况 在本地 ...

  7. 解决浏览器location.href重定向失效问题

    在[location.href]赋值语句后,添加页面刷新代码[location.reload(true)],参数为[true]这样就等价于F5刷新页面了. 需要注意的是:不能把[location.re ...

  8. C/C++中qsort()以及sort()的用法

    最近学弟们问快速排序的比较多,今天自己就做一下总结,快速排序在库函数里面有现成的,不用自己实现,调用一下就可以达到自己想要的结果,掌握以后就可以完全摒弃冒泡和选择了,并且时间复杂度也从O(n*n)提升 ...

  9. linux服务器后台运行程序

    让程序脱离终端单独运行 nohub ... & 重新连接ssh后,ps ux 可以查看所有后台程序

  10. Hie with the Pie(状压DP+可以经过多次相同的点要全部走过的最短回路)

    大意:一个人要送n份货,给出一个矩阵,表示任意两个点间的直接路径长度,求从起点0送完这n份货(到达指定的n个地点)再回到起点0的最短时间.经过任意顶点的次数不限. 分析:既然是可以过多个点,那我们可以 ...