[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
what's wrong with this? #include <stdio.h> void
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 15
Thread images: 2
File: hgkst.png (12 KB, 374x353) Image search: [Google]
hgkst.png
12 KB, 374x353
what's wrong with this?

#include <stdio.h>

void main(void)
{
printf("hello world");
}
>>
Your fucking formatting - that's what.

# include <stdio.h>

void main(void) {
printf("OP is a faggot");
}
>>
>>51686622
boy what the fuck are those
>>
return type of main should be int
>>
int main(void)
and return(0)?
>>
>>51687339
return 0;
>>
>>51686622
#include <stdio.h>

int
main(void) {
printf("whatever\n");
return 0;
}
>>
>>51686582
#include <stdlib.h>
#include <stdio.h>

int main() {
fputs("Hello world!\n", stdio);
return 0;
}
>>
>>51688150
stdout, not stdio, woops.
>>
>>51686582
void main(void) should be correct, what error does the compiler give?
>>
>>51686582
>void main
int main and return 0
>printf without formatting
use puts
>>
>>51688085
>int
>main(void) {
why tho
>>
>No translations
>No usage info
>No man page
>No info page
>No README
>No license
Just fork this instead
http://git.savannah.gnu.org/cgit/hello.git/tree/
>>
File: roflcopter.gif (1 KB, 235x150) Image search: [Google]
roflcopter.gif
1 KB, 235x150
>>51689211
Geniune LOL
>>
>>51689211
/* hello.c -- print a greeting message and exit.

Copyright 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2005,
2006, 2007, 2008, 2010, 2011, 2013, 2014, 2015 Free Software
Foundation, Inc.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */

[. . .]

/* Forward declarations. */
static void print_help (FILE *out);
static void print_version (void);

int
main (int argc, char *argv[])
{
int optc;
int lose = 0;
const char *greeting_msg;
wchar_t *mb_greeting;
size_t len;

[ . . .]

/* Having initialized gettext, get the default message. */
greeting_msg = _("Hello, world!");

/* Even exiting has subtleties. On exit, if any writes failed, change
the exit status. The /dev/full device on GNU/Linux can be used for
testing; for instance, hello >/dev/full should exit unsuccessfully.
This is implemented in the Gnulib module "closeout". */
atexit (close_stdout);

while ((optc = getopt_long (argc, argv, "g:t", longopts, NULL)) != -1)
switch (optc)
{ [. . .] }

[. . .]

/* Print greeting message and exit. */
wprintf (L"%ls\n", mb_greeting);
free(mb_greeting);

exit (EXIT_SUCCESS);
}

/* Print help info. This long message is split into
several pieces to help translators be able to align different
blocks and identify the various pieces. */

[. . .]
Thread replies: 15
Thread images: 2

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.