Here I excute the following content
char* str="\x41\x41\x41\x41";
printf(str);
The print string should be: AAAA
I try to do the same thing using test.c
, but the result is not "AAAA" but " \x41\x41\x41\x41"
C:\Users\hhcnb\Desktop\2021>test.exe \x41\x41\x41\x41
\x41\x41\x41\x41
How does this happen and how to solve it?
// test.c
#include <stdio.h>
int main(int argc ,char* argv[]) {
printf(argv[1]);
return 0;
}