23.03.28 14:47 작성
·
294
1
#include <iostream>
using namespace std;
int main()
{
char name[] = "Jack jack";
char* ptr = name;
const int n_name = sizeof(name) / sizeof(char);
while (*ptr != '\0')
{
cout << *(ptr) << '\t' << static_cast<int>(*ptr) << endl;
++ptr;
}
return 0;
}