Похожие чаты

Here, at same address two different datatypes are stored .

how is it possible to store two things at same place in memory ?

11 ответов

13 просмотров

C doesnt keep track of data types in memory you used the dirty trick of casting the pointer so it just remains as 0x401 in memory where the extra bits gets removed when you de ref. the new char ptr

Peace- Автор вопроса
Nader Jafari
C doesnt keep track of data types in memory you us...

Means it overwrites the value in memory when char ptr is assigned the address of int ptr ?

Peace
Means it overwrites the value in memory when char ...

The opposite. It doesnt touch the value in memory

1. don't obscure your code. 2. Use a pasting website to share code. 3. you are doing a narrowing conversion, of course the value printed will be different 0x0401 will be seen as as 0x01 0x00000401 (big endian notation) is what it is stored as in memory. when you take a int pointer, it points to 0x00000401 when you take a char pointer, it points to 0x01, when you do (p0+1) it points to the next byte which is 0x04

Peace- Автор вопроса
Manav | avoid unnecessary messaging me
1. don't obscure your code. 2. Use a pasting websi...

https://pastebin.com/QYeQcjzy compiler is returning smile emoji as output of last two print statements . why ? it is the same code in C++.

Peace- Автор вопроса
Peace
@usernamestring

be patient, there is a reason why i haven't replied to you yet. I need to see the output myself.

Peace
@usernamestring

Lol, what emoji do you see? a smiley face?

Peace- Автор вопроса
Peace
yes.

This-> 😄, or this-> 🙂 ?

Похожие вопросы

Обсуждают сегодня

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
@Benzenoid can you tell me the easiest, and safest way to bu.y HEX now?
Živa Žena
20
This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
🍿 °anton°
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
What is the Dex situation? Agora team started with the Pnetwork for their dex which helped them both with integration. It’s completed but as you can see from the Pnetwork ann...
Ben
1
Гайс, вопрос для разносторонее развитых: читаю стрим с юарта, нада выделять с него фреймы с определенной структурой, если ли чо готовое, или долбаться с ринг буффером? нада у...
Vitaly
9
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
@lozuk how do I get my phex copies of my ehex from a atomic wallet, to move to my rabby?
Justfrontin 👀
11
Карта сайта