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: |

Sebi said data, emails and other documents are being retrieved from the seized devices and detailed investigation is in progress. But because group chats and the channel features are not end-to-end encrypted, Galperin said user privacy is potentially under threat. Ukrainian forces successfully attacked Russian vehicles in the capital city of Kyiv thanks to a public tip made through the encrypted messaging app Telegram, Ukraine's top law-enforcement agency said on Tuesday. Asked about its stance on disinformation, Telegram spokesperson Remi Vaughn told AFP: "As noted by our CEO, the sheer volume of information being shared on channels makes it extremely difficult to verify, so it's important that users double-check what they read." The last couple days have exemplified that uncertainty. On Thursday, news emerged that talks in Turkey between the Russia and Ukraine yielded no positive result. But on Friday, Reuters reported that Russian President Vladimir Putin said there had been some “positive shifts” in talks between the two sides.
from id


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