如何用ascll码表示hello, world

如何用ascll码表示hello world
这个代码可以变化,可以表示任意长度的字母比如hi ,math

示例代码如下
有帮助望采纳~

#include <stdio.h>
#include <string.h>
int main()
{
    char a[20];
    gets(a);
    for (int i = 0; i < strlen(a); i++)
    {
        printf("%d ",a[i]);
    }
}

img

hello world 用ascll码表示是
104 101 108 108 111 32 119 111 114 108 100
你题目的解答代码如下:(如有帮助,望采纳!谢谢! 点击我这个回答右上方的【采纳】按钮)

#include <stdio.h>

int main()
{
    char a[]="hello world";
    for(int i=0; a[i]!='\0'; i++)
        printf("%d ", a[i]);

    return 0;
}