# Printing Hello World using fewest characters [duplicate]

I saw a problem which asks you to print "Hello World" using the fewest characters, including spaces. How can I further shorten this code? Thank you in advance!

#include<iostream>
int main(){printf("Hello World");}

• See the shortest C++ solution by James in “Hello, World!”. Note that as it is, your question doesn't meet this site's expectations so will be probably closed. Nov 20, 2020 at 4:09
• You can remove #include <iostream> and use puts instead of printf (assuming you're using a kind compiler that allows you to use these functions without including cstdio) (edit: it seems that neither G++ nor clang are kind enough and I was wrong) This question should almost certainly be tagged [tips]. Nov 20, 2020 at 4:10
• @manatwork i tried it but i can't compile it. Nov 22, 2020 at 13:46
• @Summer, it works for me: pastebin.com/Qr9hM6g8 Note that as we regularly force the boundaries of compilers/interpreters, warnings are acceptable by default here. Nov 22, 2020 at 19:52