zoukankan      html  css  js  c++  java
  • 转义字符和控制字符的理解

                                   首先是单个字符,是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,什么鬼,

                      我都不知道是什么回事。

                     

                                  

                                   

                                  

    一勤天下无难事。
  • 相关阅读:
    Python Challenge 第五关
    Python Challenge 第四关
    Python Challenge 第三关
    Python Challenge 第二关
    Python Challenge 第一关
    使用Python计算研究生学分绩(绩点)
    CUDA程序计时
    Python远程视频监控程序
    grunt项目构建
    jQuery中.bind() .live() .delegate() .on()的区别
  • 原文地址:https://www.cnblogs.com/nowroot/p/12367678.html
Copyright © 2011-2022 走看看