Let's write a C program

Let's write a C program.
Stdio are included

void main(void){

Attached: cv.png (347x58, 23K)

Other urls found in this thread:

en.wikipedia.org/wiki/Pragma_once
twitter.com/NSFWRedditVideo

}

>void main
>what are exit codes
faggot kys

this leupboted

Attached: redditFame.png (672x205, 35K)

you guys forgot about return 0;

:{ ;| :};

I don't know if you're trolling but there's no return code since the return type is void

>void main(void) {

Don't feed.

#ifndef FUCK_WHITE_PEOPLE
#define FUCK_WHITE_PEOPLE
#include "minorities.h"
#endif

idk if this is going to compile with standard libraries

>:{ ;| :};
what is this shit anyway?

run it and see

while (1)
malloc(10);

fpbp and redpilled

should have used while (1) {
if (malloc(10) == NULL) while(1);
}

:3:1: error: return type of 'main' is not 'int' [-Werror,-Wmain-return-type]

void main(void) {

^

:3:1: note: change return type to 'int'

void main(void) {

^~~~

int

1 error generated.

Compiler returned: 1

>void main(void){
How about something that compiles in gcc, since main must return a value. No weird embedded or windows conventions.

Since obviously OP doesn't know now how to code in respectable C, let's restart this thread. I'll start

int main(int argc, char* argv[]){

#uninclude "minorities.h"
#include "trump.h"
echo ("hello, niggers");
function(niggers.destroy):
del c:\niggers\
print "ok"
goto niggersDestroy['yes']();

>using -Werror
>ever
CS graduate detected

asm("nop;");

Attached: 1530506176168.jpg (171x218, 14K)

wew

>Not using #pragma once

>using nonstandard extensions

This pretty much.

BEQ x0, x0 deletesystem32

>reddit fame
That's all this site is these days, every post that's even vaguely witty gets posted to Jow Forums4chan with responses like "lol epic XDDD" and "wow i cant beleev ppl actually go 2 dat racist site!"

Attached: c.png (417x69, 2K)

double (*real_main(double penis_size))[10]
{

Now that program is done, what's the license of the program?

GPL_v3

Emojizz

>void main(void){
u wat mate

Do you even know what C is?
Go back to Jow Forums brainlet

>Can't program without introducing compiler warnings.

Absolute brainlet.

>compiler warnings matter more than anything
you have never programmed anything that matters, that's for sure

^h^h^h^h^h^h^h^h^h^h^h^h^h^h^h^hint main(void){return 0;}

why not make it proprietary commercial?
I mean, this code does 'nothing' in the most efficient way possible, why should we share it?

>char* instead of char *
severe cringe

absolutely fucking based.

what language is this?

Any advantage of using one over the other?

The language of NPC-meme makers.

based

LGPL

char* deez = "nuts";
for(int i = 0; i < 666; i++)
{
printf("%s", deez);
}

[spoiler]return 8 //because I'm so random lel[/spoiler]:^)

You should be arrested

>Using an outdated version of GCC

WTFPL

>he doesn't analyze his warnings to check for validity, then pragma out the ones that don't matter

int(*foo[4])(int[4],int*(*f[8])(int*(**f)(int[4],int*(*f[4])(void))));

>assuming everyone uses GCC
you're probably an automake brainlet too

an array foo of 4 pointers to functions returning int and taking first argument as an array of 4 integers, and second argument as an array of 8 pointers to functions returning pointers to ints and taking a single argument, which is a pointer to a pointer to a function returning a pointer to an int and taking first agument as an array of 4 ints, and second argument as an array of 4 pointers to functions returning pointers to ints and taking no arguments.

kek

Yeah, you are using clang instead ?
Every up to date compiler support pragma once now

Here is the list
en.wikipedia.org/wiki/Pragma_once
Even TinyCC supports it

every fucking time
still based tho

still nonstandard

Who cares
It works everywhere, that's the part that matter

XD

no it's just styling

niggerlicious

(loop (print (eval (read))))

if it isn't standard, you still need to check for it. That list is missing XC32 and Tasking, so embedded developers (e.g. me) would still definitely have to check. Since writing the check for it is far more complex than just writing the header guard, I'll stick with the header guard until the other toolchains catch up. I use GCC, but not everybody does.