#include stdio.h(6)
#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)的更多相关文章
- 第二次作业#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时输出"输入数据错误". ...
- c语言输入与输出库函数#include<stdio.h>
last modified: 2010-05-28 输入与输出<stdio.h> 头文件<stdio.h>定义了用于输入和输出的函数.类型和宏.最重要的类型是用于声明文件指针的 ...
- #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 ...
- error: /usr/include/stdio.h: Permission denied 的一种情况分析
error: /usr/include/stdio.h: Permission denied 的一种情况分析 代码: #include <stdio.h> int main(){ prin ...
- #include<stdio.h> #include "stdio.h"
https://baike.baidu.com/item/#include <stdio.h> #include <stdio.h> 编辑 #include<stdio. ...
- #include stdio.h(B)
#include <stdio.h> int main() { //***********一.循环语句*************** //什么叫做循环: //重复的做某件事情,重复的执行一 ...
- #include stdio.h(A)
/* 第一个*******知识点工程相关信息******** 1.创建工程 文件->新建->工程->win32 console applecation ->文件名不能为汉字 2 ...
- #include stdio.h(7)
#include <stdio.h> int main() { //***********一.循环语句*************** //什么叫做循环: //重复的做某件事情,重复的执行一 ...
- #include stdio.h(5)
#include <stdio.h> int main() { //1.数组的排序-冒泡排序 /* 1.规则:相邻的两个数据进行比较 2.如果有N个数据,需要选择N-1次参照物来比较, 因 ...
随机推荐
- P2962 [USACO09NOV]灯Lights 对抗搜索
\(\color{#0066ff}{题目描述}\) 贝希和她的闺密们在她们的牛棚中玩游戏.但是天不从人愿,突然,牛棚的电源跳闸了,所有的灯都被关闭了.贝希是一个很胆小的女生,在伸手不见拇指的无尽的黑暗 ...
- 数据结构7: 循环链表(约瑟夫环)的建立及C语言实现
链表的使用,还可以把链表的两头连接,形成了一个环状链表,称为循环链表. 和它名字的表意一样,只需要将表中最后一个结点的指针指向头结点,就形成了一个环. 图1 循环链表 循环链表和动态链表相比,唯一的不 ...
- jupyter notebook 设置默认目录
1.打开 cmd 输入命令 jupyter notebook --generate-config 可以看到生成文件的路径,这个就是生成的配置文件jupyter_notebook_config.py, ...
- maven 更新子工程中依赖的父工程 版本
eclipse 中: versions:update-child-modules cmd: mvn versions:update-child-modules
- Codeforces Round #532 (Div. 2)- B(思维)
Arkady coordinates rounds on some not really famous competitive programming platform. Each round fea ...
- newFixedThreadPool固定线程使用
1.newFixedThreadPool固定线程池, 使用完毕必须手动关闭线程池, 否则会一直在内存中存在, package ThreadTest; import java.util.concurr ...
- python3 unittest数据驱动
我们在自动化测试的时候,有没有遇到这样的问题?例如一个登录的接口要做自动化,会有很多case(用例),密码错误,密码正确这种.在继承unittest.TestCase的类中,凡是以“test”开头的方 ...
- tomcat 虚拟目录配置appBase和docBase的区别
先看server.xml文件host配置 <Host name="localhost" appBase="webapps" 可以修改成自己想 ...
- TXT文件导入到ORACLE数据库中
--创建表 (sqlplus执行) drop table cjw; ),phone ),city ),born ),adressJob ),mail )); ### txt导入到oracle cat ...
- 树莓派安装摄像头 C110 motion
### 1.修改成国内的软件源,否则会失败或下载太慢sudo vi /etc/apt/sources.listdeb http://mirrors.aliyun.com/raspbian/raspbi ...