Похожие чаты

Can I declare array with the size of long long

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

13 ответов

29 просмотров

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.

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

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

как правильно удалить сддм? прописал в etc/portage.use/plasma-meta -sddm , но при обновлении юзов мне предлагает поставить lightdm (ещё лучше 😡), добавил туда - display-manage...
REDis
25
Telos is at a pivotal moment. While ambitious projects like zkEVM and SNARKtor have shown promise, the delay in delivering EVM 2.0—a cornerstone of the ecosystem—is a growing ...
Trinidad
8
#include <stdio.h> #include <stdlib.h> #include <time.h> void mass_first_generate(int mass[5][7]) {     for (int N = 0; N < 5; N++) {         for (int A = 0; A < 7; A++) {   ...
Чувак
6
Всем привет! Имеется функция: function IsValidChar(ch: UTF8Char): Boolean; var i: Integer; ValidChars: AnsiString; begin ValidChars := 'abcdefghijklmnopqrstuvwxyzABCDE...
Евгений
44
Except the wealthiest, people that buy crypto want to "cash out" at the end of the day, one way or another. Converting to fiat is craziness, converting to BTC is unwise. Hold ...
Erdelanax
2
Всем привет! Решаю 99 OCaml Problems и столкнулся со следующей проблемой (прошу палками не забивать, я OCaml практически не трогал до этого момента): open OUnit2 let create_...
К|/|pи/\/\ 6е3yглbIи
2
Hello guys, hope you can help me with a quick question. I've staked some ZIL using Atomic Wallet some while ago and wanted to claim my rewards and unstake it. Atomic Wallet sa...
Martin | #bornbrave
14
Ready for some fun AND a chance to win TKO Tokens? Join us for exciting minigames in our Telegram group! 🕒 Don’t miss out—games start on today 25 October 2024, at 8 PM! Ge...
Milkyway | Tokocrypto
255
https://www.linkedin.com/posts/ugama-benedicta-kelechi-codergirl-103041300_mobiledevelopment-fluttertraining-handsonlearning-activity-7263445699227254784-IdHB?utm_source=share...
CoderGirl
16
возможно ли как-то передать в электрон или таури медиа поток с рендера 2д движка? двиг запускается как dll, а дальше надо как-то отправлять рендер кодировать не подходит, зр...
Kyle Nekto
7
Карта сайта