So do Cniles just ignore all the bugs in their language, or are they not even aware?

So do Cniles just ignore all the bugs in their language, or are they not even aware?
#include

int main() {
for (int i = 0; i < 10; i++) {
switch (i) {
case 0: puts("zero"); break;
case 1: puts("one"); break;
case 2: puts("two"); break;
case 3: puts("three"); break;
case 4: puts("four"); break;
if (i < 5) {
case 5: puts("five"); break;
case 6: puts("six"); break;
case 7: puts("seven"); break;
case 8: puts("eight"); break;
case 9: puts("nine");
}
}
}
return 0;
}

Attached: 1532663650767.jpg (979x979, 1.13M)

t. brainlet that doesn't know how a switch works

I see at least 2 errors in this code. Do you know how this will behave?

Did you make that yourself?

Attached: facepalm.jpg (1440x1080, 97K)

What is wrong with this man? Is he lifting something heavy?
>moving goalposts
70% of windows updates are to fix memory issues for C/C++
Because C/C++ is that shit.

>c/c++
Yet another Cnile hiding behind another language.

>C has bugs
>no, your code has bugs
>STOP MOVING THE GOALPOSTS! WAGADOUGOU!

>programmer writes memory leaking program
>program has memory issues
>oh no, it's the languages fault!

what did AI mean by this?

Attached: 1549109759723.jpg (1075x574, 93K)

I agree. Yikes

Attached: griffith_manga_zpsc8153ffd.gif (355x350, 124K)

it runs as if the if block did not even exist. Try to declare and use local variables in that if block. :P

This would be nearly impossible to encounter in code written by someone who understands basic C99 syntax.

>your program
I'm not that faget
70% is a bit high. It it was something safe, like java, for example, we wouldn't have memory leaks.

Nigger what the fuck are you doing

>If i is smaller than 5
>Respond to cases where i is bigger than 5

Stop bullying OP. There's nothing wrong with code if it does it's purpose!

Dios mio...

t.mentally ill

>people like this write drivers

hot skank

#include

const char *alpha_numbers[] = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"};

int main() {
for (int i = 0; i < 10; i++) {
printf("%s\n", alpha_numbers[i]);
}
return 0;
}

To be fair i do ignore array out of bounds.

not relevant to the logic error sanctioned by the c standard being addressed

This code

Attached: 1503396029227.jpg (2544x4000, 906K)

OK user, you are always right.
#include

const char *alpha_numbers[] = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"};

int main() {
for (int i = 0; i < 10; i++) {
if (i > 5) { break; }
printf("%s\n", alpha_numbers[i]);
}
return 0;
}

Smile more, babe

Attached: 1530136597240.jpg (1073x578, 81K)

#include

const char *alpha_numbers[] = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", NULL};

int main() {
for (const char **str = alpha_numbers; *str; str++) {
printf("%s\n", *str);
}
return 0;
}

why can't I do char **faggot = {"one", "two"}; if char *faggot = "one"; works?

missing [ ] for array ?

** is double pointer aka. pointer-to-pointer.

char *faggot[] = {"one", "two"};
char **nigger = faggot;

Yes, but when you ask for an array of c strings in a function, you gotta specify char ** as the argument type. I know char *fag[] means an array of pointers to a char, but an array is a pointer too, so woudn't it be logical to be able to declare it as a char **fag aswell?

Why not end the pointer array with "" and just check for true in the for() loop?

Arrays are not pointers, though they exhibit similar behavior. An array decays to a pointer as an argument in a function.

fn main() {
for i in 1..10 {
match i{
1 => println!("one"),
2 => println!("two"),
3 => println!("three"),
4 => println!("four"),
_ => ()
}
}
}

RUSTED

Thanks for your explanation! After experimenting a bit, I realized they indeed behave slightly differently.

Says a lot about anti-C fags.

Looks better than the original

fuck off nigger

when the laid off journalist learns to code lol

use rust if you're a retard

That's some bad code but have you ever heard of OSDev code where you're forced to write autistic code
idtentry(0, (unsigned)isr0, 0x08, 0x8E); // ISR0
idtentry(1, (unsigned)isr1, 0x08, 0x8E); // ISR1
idtentry(2, (unsigned)isr2, 0x08, 0x8E); // ISR2
idtentry(3, (unsigned)isr, 0x08, 0x8E); // ISR3
idtentry(4, (unsigned)isr, 0x08, 0x8E); // ISR4
idtentry(5, (unsigned)isr5, 0x08, 0x8E); // ISR5
idtentry(6, (unsigned)isr6, 0x08, 0x8E); // ISR6
idtentry(7, (unsigned)isr7, 0x08, 0x8E); // ISR7
idtentry(8, (unsigned)isr8, 0x08, 0x8E); // ISR8
idtentry(9, (unsigned)isr9, 0x08, 0x8E); // ISR9
idtentry(10, (unsigned)isr10, 0x08, 0x8E); // ISR10
idtentry(11, (unsigned)isr11, 0x08, 0x8E); // ISR11
idtentry(12, (unsigned)isr12, 0x08, 0x8E); // ISR12
idtentry(13, (unsigned)isr13, 0x08, 0x8E); // ISR13
idtentry(14, (unsigned)isr14, 0x08, 0x8E); // ISR14
idtentry(15, (unsigned)isr, 0x08, 0x8E); // ISR15
idtentry(16, (unsigned)isr16, 0x08, 0x8E); // ISR16
idtentry(17, (unsigned)isr17, 0x08, 0x8E); // ISR17
idtentry(18, (unsigned)isr, 0x08, 0x8E); // ISR18
idtentry(19, (unsigned)isr19, 0x08, 0x8E); // ISR19
idtentry(20, (unsigned)isr20, 0x08, 0x8E); // ISR20
idtentry(21, (unsigned)isr, 0x08, 0x8E); // ISR21
idtentry(22, (unsigned)isr, 0x08, 0x8E); // ISR22
idtentry(23, (unsigned)isr, 0x08, 0x8E); // ISR23
idtentry(24, (unsigned)isr, 0x08, 0x8E); // ISR24
idtentry(25, (unsigned)isr, 0x08, 0x8E); // ISR25
idtentry(26, (unsigned)isr, 0x08, 0x8E); // ISR26
idtentry(27, (unsigned)isr, 0x08, 0x8E); // ISR27
idtentry(28, (unsigned)isr, 0x08, 0x8E); // ISR28
idtentry(29, (unsigned)isr, 0x08, 0x8E); // ISR29
idtentry(30, (unsigned)isr30, 0x08, 0x8E); // ISR30
idtentry(31, (unsigned)isr, 0x08, 0x8E); // ISR31
idtentry(32, (unsigned)pit_irq, 0x08, 0x8E); // IRQ0
// same until 48, too long for Jow Forums

Plus
void isr0(void) {
isr_start();
isr_handler(0);
isr_end();
}

void isr1(void) {
isr_start();
isr_handler(1);
isr_end();
}

void isr2(void) {
isr_start();
isr_handler(2);
isr_end();
}

void isr5(void) {
isr_start();
isr_handler(5);
isr_end();
}

void isr6(void) {
isr_start();
isr_handler(6);
isr_end();
}

void isr7(void) {
isr_start();
isr_handler(7);
isr_end();
}

void isr8(void) {
isr_start();
isr_handler(8);
isr_end();
}

void isr9(void) {
isr_start();
isr_handler(9);
isr_end();
}

void isr10(void) {
isr_start();
isr_handler(10);
isr_end();
}

void isr11(void) {
isr_start();
isr_handler(11);
isr_end();
}

void isr12(void) {
isr_start();
isr_handler(12);
isr_end();
}

void isr13(void) {
isr_start();
isr_handler(13);
isr_end();
}

void isr14(void) {
isr_start();
isr_handler(14);
isr_end();
}
// Error: too many lines. this is like HALF and goes until 32

-std=c99 -pedantic -Wall -Wextra
#include
#include

static int
incr(int *const x)
{
return ++*x;
}

static int
decr(int *const x)
{
return --*x;
}

int
main(void)
{
int x = 0;
printf("%d %d\n", incr(&x), decr(&x)); // no warning despite UB being so blatant; imagine if `incr` and `decr` were better hidden and acting on a non-trivial type
return EXIT_SUCCESS;
}

Attached: segfaulting cnile.png (627x722, 114K)

>Using java
Good luck writing a high performance operative system with that

>if statement in between the case
What the fuck user

Can someone screencap this and put it with the image of the guy looking at this degree meme

Compile with wall, wextra, and pedantic

...

#define MakeISR(id) void isr#id(void) ... etc

MakeISR(0)
MakeISR(1)

But yes, i agree, its quite the autistic code, done it myself

you can't declare arrays as pointers, but you can cast them. cstrings initialize to pointer is an alias so you don't have an aneurysm everytime you create a string.

garbage in garbage out nigger

Attached: xc.png (3000x2584, 424K)

Thank you