#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次参照物来比较, 因 ...
随机推荐
- vue原理实现
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- t-sql read xlsx
How to Read and Load an Excel 2007 or Excel 2010 File Without Using Import/Export Utility To read an ...
- 2019.2.10考试T2, 多项式求exp+生成函数
\(\color{#0066ff}{ 题目描述 }\) 为了减小文件大小,这里不写一堆题目背景了. 请写一个程序,输入一个数字N,输出N个点的森林的数量.点有标号. 森林是一种无向图,要求图中不能存在 ...
- CF959C Mahmoud and Ehab and the wrong algorithm 构造
Mahmoud was trying to solve the vertex cover problem on trees. The problem statement is: Given an un ...
- 在docker容器中安装vim命令进行编辑文件
首先执行: 执行apt-get update, 然后再次执行apt-get install vim即可成功安装vim. 然后我们就可以使用vim编辑 如果不进行更新就会报错: 此时会报出bash: v ...
- HashMap 1.8的源码分析三
线程安全问题: 在添加时候并没有进行安全考虑,枷锁 所以是线程不安全的,接下来进行代码测试; package com.mmall.concurrency.example.commonUnsafe; i ...
- 8. sql 片段
sql 片段: <sql id="columnBase"> `id`, `title`, `author_id` as authorId, `state`, `feat ...
- 【STL基础】deque
deque (double-ended queue) 构造函数: //default: deque<T> d; //空的vector //fill: deque<T> d(n) ...
- 服务器运行两个或两个以上的tomcat
一:解决方法 转载: https://www.cnblogs.com/xiaobai1226/p/7662392.html 二:解决方法 将tocmat下 bin---->tomcat8w.e ...
- itchat教程
https://www.python.org/ftp/python/3.6.6/ https://www.python.org/ftp/python/3.6.6/Python-3.6.6.tar.xz ...