As The Beginner To Write A "Hello World!" Program Is The Most Commonbasic Method Of Entry.Through Writes A Successfull "Hello world!" May Practice This Programming Language Most Basic Grammar Characteristic. Here,Has Enumerated 10 "Hello world!" Program,Every Body Appeals To Both Cultured And Popular Tastes.
1.The Classic "Hello world!"
#include <>
#include <>
int main()
{
printf("Hello world!"); // Books Mode Of Writing
puts("Hello world!"); // My Favorite
puts("Hello" " " "world!"); // Splicing String Of Character
std::cout < < "Hello world!" < <>
#define Say(sth) puts(#sth)
int main()
{
return Say(Hello world!);
}
3.Quotes Out Of Context “Hello World!”
#include <>
int main()
{
return puts(&"Do not say: Hello world!"[12]);
}
4.When With Drawal Runs "Hello World!"
#include <>
#include <>
void say()
{
printf("world!");
}
void sth()
{
printf("Hello ");
}
int main()
{
return atexit(say), atexit(sth);
}
5.Reads Takes Own "Hello World!"
#include <>
#include <>
#include <>
int main()
{
std::ifstream ifs(__FILE__);
std::string say, some, word;
ifs > > say > > some > > word;
std::cout < <>
class say
{
public:
say()
{
std::cout < < "Hell"; } ~say() { std::cout < < "world!"; } }hello; int main() { std::cout < < "o "; return 0; } 7.Imported Templates "Hello World!" #include <>
template <>
class say
{
public:
void operator () ()
{
std::cout < <>()(), 0;
}
8.Calling Private Function "Hello World!"
#include <>
#include <>
class secret
{
private:
virtual void say()
{
std::cout < < "Hello world!"; } }; int main() { secret word; (reinterpret_cast <> (**(intptr_t**)(&word)))();
return 0;
}
9.Most Violence "Hello World!"
#include <>
#include <>
#include <>
void say()
{
puts("Hello world!");
exit(0);
}
int main()
{
volatile intptr_t a = 0;
volatile intptr_t * p = &a;
*(p + 2) = (intptr_t)say;
*(p + 3) = (intptr_t)say;
return 0;
}
10.The Aliens Said "Hello World!"
#include <>
void alien_say(char * p)
{
while (putchar(*(p += *(p + 1) - *p)));
}
int main()
{
return alien_say("BETHO! Altec oh liryom(a loadjudas!) dowd."), 0;
}
Knowing This Lore Makes Black Myth: WuKong Way More Enjoyable
-
https://www.ign.com/articles/knowing-this-lore-makes-black-myth-wukong-way-more-enjoyable
Knowing This Lore Makes Black Myth: WuKong Way More Enjoyable
A...
2 months ago
No comments:
Post a Comment