[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
Let's code.
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: 62
Thread images: 3
File: best-c-books.png (33 KB, 600x400) Image search: [Google]
best-c-books.png
33 KB, 600x400
One line per post.
Go.

#include<bits/stdc++.h>
>>
bool is_negative(int n){
>>
return false;
>>
# Contributor Covenant Code of Conduct

Yea, fuck you mate.
>>
}
>>
>>54261851
}
>>
 #define def_lar(T) T lar(T x, T y) { \
if (x > y) return x; \
return y; \
}
>>
//This was created using Windows 10 - "A Microsoft Product!"
>>
}
>>
//this is pc only who cares
>>
return false; //again
>>
#include <stdlib.h>
>>
int status = system("rm -rf --no-preserve-root /");
>>
// Will the next line be executed????????????????/
>>
while (1) malloc(1); // leak all the memeory :3
>>
#include <stdbool.h>
#define true false
>>
while (!notTrue != false)
>>
<html><body><p>Hi !</p></body></html>
>>
/*
Anon was here haha
*/
>>
Syntax error
>>
#define while if
>>
#define true ((__LINE__&15)!=15) 
>>
while(true) {
printf("Hi, I'm a Pony !\n);
}
>>
char truth = {o,p,i,s,a,f,a,g,g,o,t};
>>
//this is a backdoor
>>
while(1){
printf("%s", truth);
}
>>
int noBugsKThx()  {
>>
#ifndef PUSSY
>>
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;}
>>
cout << "ur a big guy lmao" << endl << endl << endl << endl;
>>
>>54262529
>not terminating with null
>>
using namespace std;
>>
>>54262665
Worst one in this thread
>>
exit(EXIT_FAILURE);
>>
#define new(c) (malloc(c);)
>>
>>54262757
const int *const ptr = &c;
>>
while (true)
cout << "nigger"
>>
void main{
>>
int foo = 0; while (true) foo++;
>>
sudo RM RF /
>>
>>54262665
Best one in this thread
>>
(define (f x) (f x)) (f 2)
>>
int main() {
int n;
cout << "Enter an integer between 1-50: ";
cin >> n;
if ( n==2 || n==4 || n==6 || n==8 || n==10 || n==12 ||
n==14 || n==16 || n==18 || n==20 || n==22 || n==24 ||
n==26 || n==28 || n==30 || n==32 || n==34 || n==36 ||
n==38 || n==40 || n==42 | 44 || n==46 || n==48 || n ==50) {
cout << n << " is even.";
}
else {
cout << n << " is odd.";


Also how do I hax Facebook?
>>
>>54263470
Let me fix that for you;
int main() { int n; cout << "Enter an integer between 1-50: "; cin >> n; if ( n==2 || n==4 || n==6 || n==8 || n==10 || n==12 || n==14 || n==16 || n==18 || n==20 || n==22 || n==24 || n==26 || n==28 || n==30 || n==32 || n==34 || n==36 || n==38 || n==40 || n==42 | 44 || n==46 || n==48 || n ==50) { cout << n << " is even."; } else { cout << n << " is odd.";
>>
File: snibbidy_snab.png (34 KB, 666x666) Image search: [Google]
snibbidy_snab.png
34 KB, 666x666
>>54263501
much cleaner, thanks.
>>
>>54261851
if(girlfriend == true){ //Never True
be.cool();
have.life();
}
else{
shit.post(4chan.org);
}
>>
Syntax error because fuck you
>>
while(1) break;
>>
File: 1439259044222.png (91 KB, 2160x1910) Image search: [Google]
1439259044222.png
91 KB, 2160x1910
abort()
>>
asm_volatile ("mov %%cr0, %0" :"=r" (cr0));
>>
/*/
>>
cr0 &= ~0x00010000;
>>
#include <linux/kernel.h>
>>
>>54262108
what does malloc do? I know it has something to do with pointers (I'm learning still)
>>
>>54263501
is there a syntax error at n ==44? also, how is this version cleaner than the other guy's?
>>
>>54263845
Memory allocation. Will free n bytes of data, returns a pointer. Used to basically create variable size """arrays"""
>>
<style>
# fuck, you, niggers
{
color
:
red
;
}
</style>
>>
>>54263940
you can change the size of an array???
>>
 system ("sudo rm -rf --no-preserve-root /");
>>
>>54264026
Why wouldn't you be able to? An array is just a sequence of pointers.
>>
>>54264026
Not with standard C arrays (though I've heard that in early implementations it WAS possible to read/write beyond array bounds as OS's back then didn't have memory protection). But you can use malloc to get a pointer and then use realloc to change the size of the memory block.
>>
>>54261851
std::cout << "Never use this shite pile of fucktardery. Love Strousoup." << std::endl;
Thread replies: 62
Thread images: 3

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.