首页 > 其他 > 详细

转义字符和控制字符的理解

时间:2020-02-26 17:46:14      阅读:110      评论:0      收藏:0      [点我收藏+]

                               首先是单个字符,是sizeof(char),使用的ASCII转换为数字存储。 控制字符有特别含义,如转行,

                               这个其实就printf实现的功能,详细需要追踪printf函数的实现,串口打印。

                                

 1 #include "common.h"
 2 #include <stdio.h>
 3 #include <stdlib.h>
 4  
 5 static float test_point = 1.3435;
 6 static int   normal_point = 1;
 7 
 8 
 9 //8进制g
10 static int   test_data = 01000;
11 static char  signed_data = 0b01111111;
12 static unsigned char  unsigned_data = 0b11111111;
13 static char  full_signed_data = 0b11111111;
14 static char  A = a;
15 
16 
17 
18 int main()
19 {
20     char letter = \a;
21 
22     {
23         while (1)
24         {
25             printf("letter is %c\n", letter);
26             Sleep(1000);
27         }29         printf("my first task\n");
30     }
31 
32     return 0;
33 } 

                  在window写这个程序会有声音,啊哈哈哈,之前使用的单片机和嵌入式linux,什么鬼,

                  我都不知道是什么回事。

                 

                              

                               

                              

转义字符和控制字符的理解

原文:https://www.cnblogs.com/nowroot/p/12367678.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!