Telegram Group & Telegram Channel
Скомпилируется ли такой код на Си?

И если нет, то почему?

#include <sys/fcntl.h>
#include <sys/types.h>
#include <errno.h>
#include <unistd.h>
#include <stdio.h>

typedef struct {
int mtime;
int size;
} Storage;

void load(Storage *st) {
scanf("%d%d", &st->mtime, &st->size);
}

int main() {
Storage st;
load(&st);
int st_mtime = st.mtime;
int st_size = st.size;
printf("st_mtime = %d, st_size = %d\n", st_mtime, st_size);
return 0;
}


Примечания:
- компилируем под GNU/Linux на x86_64 с glibc и компилятором gcc любой не очень древней версии
- можно убедиться, что код содержит только ASCII-символы и не содержит длинных последовательностей пробелов (то есть приколов вроде «вот здесь используется кириллическое е вместо e латиницей, попались!» в этом коде нет)
- в дополнение к предыдущему пункту: если вы перенаберете код в своей любимой IDE так, как его видите в посте, то он будет абсолютно идентичен

Догадки можно писать в комментарии :)



group-telegram.com/gepardchan/136
Create:
Last Update:

Скомпилируется ли такой код на Си?

И если нет, то почему?

#include <sys/fcntl.h>
#include <sys/types.h>
#include <errno.h>
#include <unistd.h>
#include <stdio.h>

typedef struct {
int mtime;
int size;
} Storage;

void load(Storage *st) {
scanf("%d%d", &st->mtime, &st->size);
}

int main() {
Storage st;
load(&st);
int st_mtime = st.mtime;
int st_size = st.size;
printf("st_mtime = %d, st_size = %d\n", st_mtime, st_size);
return 0;
}


Примечания:
- компилируем под GNU/Linux на x86_64 с glibc и компилятором gcc любой не очень древней версии
- можно убедиться, что код содержит только ASCII-символы и не содержит длинных последовательностей пробелов (то есть приколов вроде «вот здесь используется кириллическое е вместо e латиницей, попались!» в этом коде нет)
- в дополнение к предыдущему пункту: если вы перенаберете код в своей любимой IDE так, как его видите в посте, то он будет абсолютно идентичен

Догадки можно писать в комментарии :)

BY Гепардово гнездо


Warning: Undefined variable $i in /var/www/group-telegram/post.php on line 260

Share with your friend now:
group-telegram.com/gepardchan/136

View MORE
Open in Telegram


Telegram | DID YOU KNOW?

Date: |

At the start of 2018, the company attempted to launch an Initial Coin Offering (ICO) which would enable it to enable payments (and earn the cash that comes from doing so). The initial signals were promising, especially given Telegram’s user base is already fairly crypto-savvy. It raised an initial tranche of cash – worth more than a billion dollars – to help develop the coin before opening sales to the public. Unfortunately, third-party sales of coins bought in those initial fundraising rounds raised the ire of the SEC, which brought the hammer down on the whole operation. In 2020, officials ordered Telegram to pay a fine of $18.5 million and hand back much of the cash that it had raised. 'Wild West' The next bit isn’t clear, but Durov reportedly claimed that his resignation, dated March 21st, was an April Fools’ prank. TechCrunch implies that it was a matter of principle, but it’s hard to be clear on the wheres, whos and whys. Similarly, on April 17th, the Moscow Times quoted Durov as saying that he quit the company after being pressured to reveal account details about Ukrainians protesting the then-president Viktor Yanukovych. Although some channels have been removed, the curation process is considered opaque and insufficient by analysts. Soloviev also promoted the channel in a post he shared on his own Telegram, which has 580,000 followers. The post recommended his viewers subscribe to "War on Fakes" in a time of fake news.
from tw


Telegram Гепардово гнездо
FROM American