Похожие чаты

Can I declare array with the size of long long

int? like this one?
int arr[18446744073709551615];

13 ответов

13 просмотров

ask your platform.

Md. Redwan Hossain- Автор вопроса

shitty exam question

Md. Redwan Hossain
shitty exam question

That is, 1.84 x 10^ 20 x 4 bytes if int is 4 bytes which is ~736000000 terabytes

John
why should declaration care about runtime env ?

It should not but afaik it's a fixed length array, declaration is definition. Also declaring such large arrays will overflow stack.

Manav | avoid unnecessary messaging me
That is, 1.84 x 10^ 20 x 4 bytes if int is 4 bytes...

well that is -1 in signed integers iirc... but anyways stack can't be anywhere that big so compiler will deny it in code gen pass.

swarnim
well that is -1 in signed integers iirc... but any...

On todays computer. From the language construction (c++ 14) it is the type of size_t. Does standart prohibit that kind of thing ?

John
On todays computer. From the language construction...

standard shouldn't say anything about it from what I know C++ standards go to extreme lengths to not talk about implementation details

swarnim
well that's not always true

Some of the UB they have is them refusing to talk about stuff which is implementation defined, can't think of a concrete example atm. Also i don't think C++ standard defines an upper bound on the largest fixed sized array.

John
On todays computer. From the language construction...

stack size can is limited to platform object size no system i know of supports that much object size hence the conclusion.

Manav | avoid unnecessary messaging me
standard shouldn't say anything about it from what...

Thats why stack size is platform dependent (which i meant by runtime env). On 16 bit Segmented even you cannot allocate > 1MB.

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

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

@LGCYMan @JustinKKW Q/A List 1. this part confuses me on #8: "From there, a bridge between erc20 LGXY and erc20 LGXY will be out once that swap is closed." does this mean ...
Sig | LGCY | BattleVerse L1 | BitWin
1
Did @Beeker really get banned? That's ridiculous. He's one of the few left here with half a brain and you might not always like his narrative @dgb_ycagel , but he often keeps ...
Leroy Gerrits
1
async login(req: Request, res: Response, next: NextFunction): Promise<void> { try { const { errors, input } = await RequestValidator(LoginRequest, req.body...
. .
1
Anyone here suffers from unexplained aural migraines, who would be up for talking for a bit? Doesn't *have* to be aural, but I am not asking about headaches, I mean actual mi...
Martin Rys
55
Привет, нужен совет старших товарищей. Есть глобальная переменная var DefaultDataFolder:string; инициализируем DefaultDataFolder:='a:\_OUT\'; есть примитивная процедур...
Max Otto
14
A couple thoughts from a random internet stranger: 1. If you want this project to gain traction you cannot keep being negative. If I just came here after finding out about Kd...
Eric Wild
46
We heading to 1.1$ 🤔?
CryptoBo$$
35
Вопрос. Теоретический. Есть список команд. Команды отправляю в обработку некой функции, по очереди. Разные команды могут давать разные результаты после обработки. В зависимос...
Serjone
7
Agreed. And on a lighter note, I just love the idea of earning $FunToken while having fun. It’s like getting paid to do what we love. Who wouldn’t want that? 😄
SpaceGemz
13
у меня немного странная проблема причину которой я никак не могу понять.. что не делаю, даже если я с гитхаба скачаю чистый кловер у меня остаются старые бут арги и я не мог...
Σοφία ✨🐾
5
Карта сайта