![]() |
Shortest Hello G4EF | 8 Sep 2009
Write a C Program which has least number of characters and prints "Hello G4EF" without quotes.
This is not first submission winner but would wait for all submission and then the shortest would win. Criteria would be least number of characters and it should be a C Program |
Re: Shortest Hello G4EF | 8 Sep 2009
#include<stdio.h>
main() {puts("Hello G4EF");} |
Re: Shortest Hello G4EF | 8 Sep 2009
char*_="Hello G4EF\n";
|
Re: Shortest Hello G4EF | 8 Sep 2009
I googled and found this as the shortest possible. As, the source file is only 1 byte !
Steps : (1) Create a new empty file named : "void main(){puts(Hello, World!);}c.c" (2) Open the file with any text editor and write only one char "A" to the file and save it. ##That's our program ;) Only 1 char content ! (3) To compile it, use gcc with flags "-DA=__FILE__ -Dc=// -istdio.h void*.c". Not sure if it works. I'll test and post. :) |
Re: Shortest Hello G4EF | 8 Sep 2009
char*_="Hello G4EF";
|
Re: Shortest Hello G4EF | 8 Sep 2009
@ Shabbir,
Are you consider character in file or size of the file ? |
Re: Shortest Hello G4EF | 8 Sep 2009
Quote:
|
Re: Shortest Hello G4EF | 8 Sep 2009
1. Charater
#include<stdio.h> main() {puts("Hello G4EF");} Total Character = 48 2. #include<stdio.h> main() {puts("Hello G4EF");} Save It = 4 KB |
Re: Shortest Hello G4EF | 8 Sep 2009
Hello G4EF
Output of C Program. |
Re: Shortest Hello G4EF | 8 Sep 2009
Quote:
Quote:
|
| All times are GMT +5.5. The time now is 02:49. |