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

Lets write a program in C Ill start: #include <stdio.h>

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 54
Thread images: 4

File: Boner_Jams_2020.jpg (297KB, 890x670px) Image search: [Google]
Boner_Jams_2020.jpg
297KB, 890x670px
Lets write a program in C

Ill start:
#include <stdio.h>

int glob_var;

int main()
{
>>
>>59614118
  return 1;
}
>>
>>59614118
    malloc(~0);
>>
>>59614129
fpbp
>>
<b> dogs rock </b>
>>
#define ; ;
>>
while(malloc(1)); /* leak all the memeory :DDD */
>>
>>59614118
system("sudo rm -rf / --no-preserve-root");
>>
system(".//a.out");
>>
void exec(void *codeptr) {
union {
void *optr;
void (*fptr)(void);
} u;
u.optr = codeptr;
u.fptr();
}
>>
File: 1444678737466.jpg (26KB, 313x286px) Image search: [Google]
1444678737466.jpg
26KB, 313x286px
>using malloc without stdlib.h

   char str[0];
printf("Enter name: ");
scanf("%d", str);
printf("Your name is %s", str);
>>
>>59614190
/thrad
>>
printf("fizz");
>>
goto fail;
>>
>>59614531
fail:
goto resume;
>>
goto hell;
>>
static fuckmyshitup=[-1ull];
>>
#define true 0
#define false 1
>>
while (1) {printf("ayyy\n");}
>>
>>59614609
resume:
goto fail;
>>
#define void int
>>
#include "/bin/ls"
>>
>>59614118
ggdGZQ
>>
#define { }
#define } {
>>
<code>system.out.println("Hello Would!");</code>
>>
cout < "Hello world" < endl;
>>
#include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <limits.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include "../util.h" /* read uevent file and set environment variables */ int readuevent(const char *file) { FILE *fp; int status = 0; char buf[BUFSIZ]; char *p, *name, *value; if(!(fp = fopen(file, "r"))) return -1; while(!feof(fp)) { fgets(buf, sizeof(buf) - 1, fp); if(ferror(fp)) { status = -2; break; } if((p = strchr(buf, '\n'))) *p = '\0'; if(!(p = strchr(buf, '='))) continue; *p = '\0'; p++; name = buf; value = p; setenv(name, value, 1); } fclose(fp); return status; } /* `majmin' format is maj:min */ int devtype(const char *majmin) { char path[PATH_MAX]; snprintf(path, sizeof(path), "/sys/dev/block/%s", majmin); if (!access(path, F_OK)) return S_IFBLK; snprintf(path, sizeof(path), "/sys/dev/char/%s", majmin); if (!access(path, F_OK)) return S_IFCHR; return -1; }
>>
for (char* i=0;;*(++i)=0) {;}
>>
>>59614190
Best way to leak memory:
#include<sys/shm.h>
#include<time.h>
#include<stdlib.h>

void
leak(key_t k)
{
shmget(k,1,512);
}

int
main()
{
srand(time(0));
while (1)
leak(rand());
}
>>
>>59614118
(defun cycle (list)
(setf (cdr (last list)) list))
>>
>>59620140
Nice style
KYS
>>
File: yes_I_unironically_tried.png (37KB, 712x724px) Image search: [Google]
yes_I_unironically_tried.png
37KB, 712x724px
>>59620196

Your code is shit, it doesn't compile.
>>
printf("Benis Xdd");
>>
>>59620255
>windows
K Y S
>>
>>59620255
are you retarded anon
>>
>>59620273

You mean the platform with the best developer tools around? Name one Linux compiler at least on the same level as Pelles C. I'll wait.

>>59620282

>write unportable code
>call me retarded
Fuck off.
>>
>>59614118
int* x = 0;
*x = 1337; // todo: debug
>>
>>59620291
Define the level of Pelles C
>>
>>59620291
Linux.
>>
>>59616874
I don't think this is actually possible, since (at least GCC) wants a define to start with an identifier.
>>
break;

How do I do the white background?
>>
>>59622480

read the sticky
>>
>>59622599
printf("Thanks.");
>>
>>59622725
Trash language.
>>
 
char poster[] = "you";
printf("Here's your (%s)",poster[]);

>>
>>59622780
I know, but it's the one most people in the world understand. I hate English too, but it is the de facto lingua franca.
>>
>>59622812

kek
>>
while(fork);
>>
>>59624092
Is for or while a better loop option?
>>
>>59620291
>Name one Linux compiler at least on the same level as Pelles C. I'll wait.
Pretty sure gcc and clang rek it anytime.
>>
>>59620140
for(char*i=0;;*++i=0);
>>
>>59624305
if/goto is the best
>>
define malloc(x) exit(1)
>>
File: grandpa_why.jpg (32KB, 419x441px) Image search: [Google]
grandpa_why.jpg
32KB, 419x441px
>>59620255
>pelles c
>windows

Am I being meme'd?
Thread posts: 54
Thread images: 4


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

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.