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


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

                      我都不知道是什么回事。

                     

                                  

                                   

                                  

    一勤天下无难事。
  • 相关阅读:
    设置GridView、DataGrid 以提供thead、tbody等标签
    SqlCommandBuilder 可批量新增与修改数据
    js中的截流
    react代码分离方案
    redux在react中的使用
    react 生命周期
    react 函数bind(this)的三种方式
    react 三种组件定义方式
    linux系统下nginx安装目录和nginx.conf配置文件目录
    react component lifecycle
  • 原文地址:https://www.cnblogs.com/nowroot/p/12367678.html
Copyright © 2020-2023  润新知