From: Vitaly Ostanin <vyt@vzljot.ru> To: ALT Linux Community <community@altlinux.ru> Subject: [Comm] [JT] C function parameters order Date: Thu, 18 Aug 2005 12:36:35 +0400 Message-ID: <43044893.3000909@vzljot.ru> (raw) [-- Attachment #1: Type: text/plain, Size: 536 bytes --] Здравствуйте. Тут прислали прикол: #include <stdio.h> void test(int a, int b, int c, int d) { printf("a=%d, b=%d, c=%d, d=%d\n", a ,b, c, d); } void main(void) { int c = 1; test(++c, ++c, ++c, ++c); test(c++, c++, c++, c++); printf("\nc=%d\n", c); } gcc-3.4.4 и борландовский turbo C 2.0.1 говорят: a=5, b=4, c=3, d=2 a=8, b=7, c=6, d=5 c=9 А MS visual C 6.0 говорит: a=5, b=4, c=3, d=2 a=5, b=5, c=5, d=5 c=9 Кто из них не прав? -- Regards, Vyt mailto: vyt@vzljot.ru JID: vyt@vzljot.ru [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 256 bytes --]
next reply other threads:[~2005-08-18 8:36 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-08-18 8:36 Vitaly Ostanin [this message] 2005-08-18 8:53 ` Andrew Borodin 2005-08-18 9:22 ` [Comm] " Vitaly Ostanin 2005-08-18 8:57 ` [Comm] " Alexey V. Novikov 2005-08-18 8:59 ` Damir Shayhutdinov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=43044893.3000909@vzljot.ru \ --to=vyt@vzljot.ru \ --cc=community@altlinux.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git