1

I use Visual Studio 2015. There is a simple code

char blablabla[] = "‭ABCDEFGH";

int main()
{
    int a = sizeof(blablabla);
    return 0;
}

Debugger shows that blablabla has "?ABCDEFGH" and a is 10. What does this question mark doing here?

1
  • 3
    Did you copy and paste the string from somewhere? Commented Jul 20, 2017 at 9:08

1 Answer 1

3

You have an unicode character of \u202D in your array that can not be represented in the current code page. Hence the displayed ? character.

Sign up to request clarification or add additional context in comments.

6 Comments

I have opened the main.cpp with hex editor. It is not in UNICODE but it has some weird symbols in before the A letter.
"‭ABCDEFGH" this is how string looks in the hex editor
@zulunation so it seems you've found the answer.
But what a hell this symbol is doing in the string declaration?
@zulunation you probably didn't type that text but you copy/pasted it from somewhere, and that u202d comes from there for whatever reason.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.