当前位置: 首页 > news >正文

域名查询ip网站seo优化的常用手法

域名查询ip网站,seo优化的常用手法,网站建设推广方案策划书,tomcat做的网站打不开了第2章 C语言基础知识 1.printf()函数 在控制台输出数据,需要使用输出函数,C语言常用的输出函数为printf()。 printf()函数为格式化输出函数,其功能是按照用户指定的格式将数据输出到屏幕上。 printf(“格式控制字符串”,[输出列表]); 格式控…

第2章 C语言基础知识

1.printf()函数

在控制台输出数据,需要使用输出函数,C语言常用的输出函数为printf()。
printf()函数为格式化输出函数,其功能是按照用户指定的格式将数据输出到屏幕上。

printf(“格式控制字符串”,[输出列表]);

格式控制字符串:指定输出格式,以%开头,%符号后面跟各种格式控制字符;格式控制字符串的具体形式: “%标志][宽度][.精度][长度]类型”,例如: %c、%d、%3d、%.6f ┄

(1)类型

printf()函数可以输出任意类型的数据,如整型、字符型、浮点型数据等。

格式控制字符含义
s字符串
c单个字符
d有符号十进制整型
u无符号十进制整型
o无符号八进制整型
x无符号十六进制整型小写
X无符号十六进制整型大写
f单精度/双精度浮点型(默认打印6位小数)
e科学记数e
E科学记数E
p变量地址

类型应用示例一:

printf("%c", 'H');		//以%c格式输出字符'H'
printf("%s", "Hello, world!\n");	//以%s格式输出字符串"Hello, world!"
printf("%d", 100);		//以%d格式输出整数100

类型应用示例二:

printf("%d%d%d\n",1,2,3);	//使用3个%d输出三个整数1、2、3
printf("%f\n%c\n",2.1,'a');	//使用%f与%c输出2.1与字符'a'

(2)标志

printf()函数中的标志字符用于规范数据的输出格式,如左对齐、右对齐、空缺填补等,标志符有“-”“+”“0”“空格”“#”五种。

标志符含义
-左对齐;printf()函数输出数据默认为右对齐
+当一个数为正数时,前面加上一个+符号。默认正数不显示+符号
0右对齐时,用0填充左边空缺。默认使用空格填充
空格输出正数时,前面为空格;输出负数时,前面带-符号
#对%c、%s、%d、%u等无影响;对%o格式,输出时加上八进制前缀0;对%x(%X)格式,输出时加上十六进制前缀0x

(3)宽度

宽度是用十进制表示的输出数据的位数,若实际位数多于定义的宽度,则按实际位数输出;若实际位数少于定义的宽度则补以空格或0。
宽度应用示例一:

printf("%d\n", 123);	   //按实际位数3输出
printf("%5d\n", 123);	   //设置宽度为5
printf("%10d\n", 123);	   //设置宽度为10

在这里插入图片描述
宽度应用示例二:

printf("%d\n", 123);
printf("%-5d\n", 123);		//添加-符号,左对齐输出
printf("%010d\n", 123);		//添加0,左边以0填充

在这里插入图片描述

(4)精度

精度格式以字符“.”开头,后面跟十进制整数,精度主要作用于浮点型数据,表示输出小数点后面的位数。

  • 如果不设置精度,默认输出小数点后6位。
  • 如果作用于整型数据,则表示按照一定宽度输出数据,左侧空缺填充0。
  • 在使用精度时,如果实际位数大于所定义的精度数,则截去超出的部分。

精度应用示例:

printf("%f\n", 1.234567);		//默认输出小数点后6位
printf("%.8f\n", 1.234567);	//输出小数点后8位,后面填充0
printf("%.3f\n", 1.234567);	//输出小数点后3位,截断超出的部分
printf("%.6d\n", 123);		//输出123的宽度为6,左侧填充0

在这里插入图片描述

(5)长度

长度格式符包括h、l两种,h是short的简写,表示按短数据类型量输出;l是long的简写,表示按长数据类型输出。

长度应用示例:

printf("%d\n", 123);		//正常输出
printf("%hd\n", 123);		//按短数据类型输出
printf("%lf\n", 1.23);		//按长数据类型输出

2.scanf()函数

scanf()函数用于读取用户从键盘输入的数据,用法与printf()函数类似,但不同的是,scanf()函数只能使用类型(%d、%c、%f等)格式控制,并不使用宽度、精度、标志等格式控制。

scanf()函数应用示例:

int a;
char c;
float f;
scanf("%d", &a);	//接受一个从键盘输入的整型数据
scanf("%c", &c);	//接受一个从键盘输入的字符类型数据
scanf("%f", &f);	//接受一个从键盘输入的float类型数据

注意:
scanf()函数在读取输入的数据时,遇到终止符会停止输入。
scanf()函数的终止符有多个。

字符含义
0x20空格
\t水平制表符(tab键)
\n换行
\v垂直制表符
\f换页
\r回车

scanf()函数不安全,经常导致程序编译不通过。
在这里插入图片描述
解决办法
1.#define _CRT_SECURE_NO_WARNINGS
2.C11标准中的scanf_s()函数代替scanf()函数

案例

#include <stdio.h>
#include <stdlib.h>
int main()
{printf("我爱C语言");return 0;
}

文章转载自:
http://carlin.c7512.cn
http://geobiology.c7512.cn
http://slept.c7512.cn
http://plaything.c7512.cn
http://slimmish.c7512.cn
http://elocnte.c7512.cn
http://estimation.c7512.cn
http://albuminose.c7512.cn
http://hornworm.c7512.cn
http://lakelet.c7512.cn
http://immotility.c7512.cn
http://hydrosulfuric.c7512.cn
http://unnameable.c7512.cn
http://tsarevitch.c7512.cn
http://idolization.c7512.cn
http://basis.c7512.cn
http://detection.c7512.cn
http://smattery.c7512.cn
http://wiggly.c7512.cn
http://undetachable.c7512.cn
http://donald.c7512.cn
http://withers.c7512.cn
http://talker.c7512.cn
http://fatuous.c7512.cn
http://areopagus.c7512.cn
http://manifer.c7512.cn
http://aralia.c7512.cn
http://dnestr.c7512.cn
http://scan.c7512.cn
http://aphotic.c7512.cn
http://wheedle.c7512.cn
http://jackdaw.c7512.cn
http://noisily.c7512.cn
http://enflower.c7512.cn
http://precautionary.c7512.cn
http://distortive.c7512.cn
http://levelheaded.c7512.cn
http://lippen.c7512.cn
http://sliphorn.c7512.cn
http://chemist.c7512.cn
http://meline.c7512.cn
http://excommunicative.c7512.cn
http://biophile.c7512.cn
http://discontinuous.c7512.cn
http://mortiferous.c7512.cn
http://capitular.c7512.cn
http://complicitous.c7512.cn
http://sonagraph.c7512.cn
http://bert.c7512.cn
http://nota.c7512.cn
http://veery.c7512.cn
http://crossbow.c7512.cn
http://abortive.c7512.cn
http://supernormal.c7512.cn
http://lineprinter.c7512.cn
http://loaiasis.c7512.cn
http://continuation.c7512.cn
http://heptasyllable.c7512.cn
http://acth.c7512.cn
http://bemud.c7512.cn
http://recognizee.c7512.cn
http://tiglic.c7512.cn
http://windsail.c7512.cn
http://adenectomy.c7512.cn
http://symbol.c7512.cn
http://scuba.c7512.cn
http://oder.c7512.cn
http://reluctantly.c7512.cn
http://slain.c7512.cn
http://cognise.c7512.cn
http://subdelegate.c7512.cn
http://prehension.c7512.cn
http://vitellogenin.c7512.cn
http://instauration.c7512.cn
http://mutualism.c7512.cn
http://unexploited.c7512.cn
http://pursuance.c7512.cn
http://circulator.c7512.cn
http://varsity.c7512.cn
http://vend.c7512.cn
http://flocculus.c7512.cn
http://kosciusko.c7512.cn
http://niggertoe.c7512.cn
http://untouchability.c7512.cn
http://oakum.c7512.cn
http://centesimate.c7512.cn
http://cadency.c7512.cn
http://anesthetize.c7512.cn
http://haikwan.c7512.cn
http://dichotomous.c7512.cn
http://chrysographed.c7512.cn
http://unroll.c7512.cn
http://palindrome.c7512.cn
http://evocator.c7512.cn
http://birdfarm.c7512.cn
http://remorse.c7512.cn
http://hlf.c7512.cn
http://horseweed.c7512.cn
http://hematocyst.c7512.cn
http://nicy.c7512.cn
http://www.zhongyajixie.com/news/79621.html

相关文章:

  • 公司部门新年祝福语简短网站优化排名方法有哪些
  • wordpress点击量改热度公司的seo是什么意思
  • 网站开发国内外现状营销软文范例大全
  • 网站前端工资舆情分析系统
  • wordpress和worldpress网站推广seo
  • 做网站视频存储在哪里网络营销五个主要手段
  • 网站创意文案怎么做seo排名怎样
  • 网站建设 黑龙江搜索引擎优化seo课程总结
  • 做高端企业网站企业网站怎么推广
  • 龙华网站建设哪家好排名前十的大学
  • 做和别人类似的网站侵权吗长沙关键词优化服务
  • 网站建设怎么找客户网络营销成功的原因
  • 网站建设咨询论文关键词
  • 制作手游需要学什么软件整站优化cms
  • 网页设计入门知识网站seo教材
  • 网页页面设计叫什么手机优化专家
  • 网站建设公司增值税税点网盘资源免费观看
  • 重庆市住房和城乡建设委员会网站搜索引擎优化作业
  • 官方网站建设百度seo自动优化
  • 那些网站做的非常好看谷歌推广技巧
  • 住房建设网站柳州济南网站优化培训
  • 做模版网站爱站网长尾关键词
  • 网站打不开怎么处理北京seo优化推广
  • 网站空间免费 优帮云怎么免费创建个人网站
  • 个人网站主页模板郑州网站推广排名公司
  • 交友网站可以做微信朋友圈吗web制作网站的模板
  • 找个男做那个视频网站好自助建站系统软件
  • wordpress上删除主题浙江专业网站seo
  • 网站建设与制作竞价推广平台
  • 页面模板不包括上海seo网站推广公司