// -------------------------------------#include stdio.hint main() {char ch[5] = {H, e, l, l, o};
编程学习网为您整理以下代码实例,主要实现:C语言%c打印字符值,希望可以帮到各位朋友。
// -------------------------------------
#include <stdio.h>
int main() {
char ch[5] = {'H', 'e', 'l', 'l', 'o'};
int i = 0;
while( i < 5 ) {
printf("ch[%d] = %c\n", i, ch[i] );
i = i + 1;
}
}