三字符组

三字符组
三字符组就是用于表示另一个字符的三个字符序列,又称为三字符序列。三字符序列总是以两个问号开头。

三字符序列不太常见,但 C++ 标准允许把某些字符指定为三字符序列。以前为了表示键盘上没有的字符,这是必不可少的一种方法。

三字符序列可以出现在任何地方,包括字符串、字符序列、注释和预处理指令。

 

 1 #include <iostream>
 2 
 3 /* run this program using the console pauser or add your own getch, system("pause") or input loop */
 4 using namespace std; 
 5 int main(int argc, char** argv) {
 6     int a;
 7     float b;
 8     char c;
 9     scanf("%d %c %f",&a,&c,&b);
10     printf("a=%d,b=%f,c=%c\n",a,b,c);
11     return 0;
12 }

 

posted @ 2018-08-01 14:00  borter  阅读(548)  评论(0编辑  收藏  举报