Coding in C

Hi.... I am studying IT on CTU and I need help with specialized code that would end by killing itself because of stress and existential crysis.
Can somebody write down a quick C code that would do that?

Disclaimer: I want my teacher to see that code so he will finally understand that i don't have mental capacity to make 1k+ lines of code in 1 week with another programming lessons in Python, Shell and Java.

It sounds like you need to talk to a counselor.

C is for fagot CIA NIGGERS.
Holy C is for those who have divine intellect.

code can't have existential crysis

what is CTU

I could.
private messaged you pay information :^
btw the more lines there are the easier they are to write

Czech Technical University

I know that. It was meant as a joke but if you could make a survey with stress and existential crysis points.... that would be awesome.

Probably. I caused it myself but programming in 4 different languages is still a little bit of overkill. :-D

If the RLE results in a run time error, then it should recursively throw in semi-colons at the ends of lines in all the permutations (avoiding double semi-colons and things like "};"). Then eliminate all the cases where these result in runtime errors. Thereafter present the cases where the code actually compiled. If it's just one missing semi-colon missing - done. A few semi-colons missing - done!

>1k+ lines of code in 1 week
That's like 1-2 hours a day depending on how figured out you have it. If you don't have time for homework why are you even studying retard?

const int elements;
int Array[elements]; // Compile Error


Visual Studio wants me to learn C++?

>crysis
>three fucking times itt

gid gud fgt

#define ELEMENTS 10
int Array[ELEMENTS];

CIA nigger

It's a viral for the next release.

Vojta is that you?

Zabij se.

czesi jedzo guwno

Jebane polaki cebulaki, kurwa.

>hide and seek champion
not really

The good news is that this is in C99.
The bad news is that Microsoft will never support C99, so you'll never be able to use this in a serious project (inb4 some mentally insane freetard going >serious project > windows)

The questionable news is that there's a way to do flexible size arrays with a little hack (that works in every implementation):

#include "stdlib.h";
#include "stdio.h";

struct dynArray {
int count;
int array[1];
};

struct dynArray* makeDynArray(int size) {
struct dynArray *returnVal = malloc(sizeof(struct dynArray) + (sizeof(int) * size) - 1);
returnVal->count = size;
}

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

int count = 9; // or get if from wherever
struct dynArray* myArray = makeDynArray(count);
myArray->array[8] = "Yeah, this is still legal.";
}


Oh, and if you need the array to consist of another type than "int", you need to copy-paste the code. Or create an insane macro nobody is going to figure out later. Or just go full "fuck it mode" and make it an array of chars and you handle all typing and offset | size calculation yourself, end up with an unmaintainable nightmare and hope to god the code never runs on a system with different endianness.

Seriously, it's no surprise people use C++ instead.

Cry more, faggot. I did cvut while studying math on matfyz. Your workload is nothing unmanageable, btw you picked the worst program you could. Vutbr is better in one way, matfyz is better in the other way. Fjfi is the only faculty worth anything on cvut.
Better just kys.

Can't you just make a loop that adds some numbers every time and surround it with a try and catch statement that says something like System.exit (0);

try again with GCC 4

Wait, do Microsoft not have support for variable size arrays on the stack?
REALLY?

Yeah. And they'll never have them.
It's no wonder C++ is the language everyone use when performance matters (and you're not a Rust-hipster) and not C.

Why not just use realloc?

How does that help?

Of anything, if you really need stack allocation, you can use alloca.
Be fucking careful with that, though.

(and I forgot to return returnVal so the program is undefined behavior regardless. Fuck).