Introduction :
Printing “Hello World” is the first program, you have to write when learning a new programming language. In the C programming language, printf() function is used to print output to the console screen. However, there are other ways to print output to the screen. Sometimes, you have to know alternative methods to print “Hello World” on the console screen.
In this article, I shall show you how to print “Hello World” to the screen without using the printf() function in C programming language.
Print “Hello World” without output function :
Generally, in C language, it is not possible to print “Hello World” without using an output function. But in this program, I shall show you how to print “Hello World” on the screen without any output function. In Turbo C++, you can run this following program that prints “Hello World” on the screen without any output function.
To run this program, you have to install Turbo C++ IDE on your PC. First, copy the below code and paste in a new file of Turbo C++. Now, save it with .c extension. If you do not know how to copy paste in Turbo C++ IDE, just follow it.
/* Developd by Puskar Jasu*/
#include <conio.h>
int main()
{
int i;
int j = 0;
char mes[] = "Hello World";
char far *var = (char far *)0xB8000000L;
for (i = 0; i <= 20; i = i + 2)
{
*(var + i) = mes[j];
j++;
}
getch();
return 0;
}
Output :
After running the above code, you can see the following output like below image.

Print “Hello World” with other output functions :
Now I shall explore you how to print “Hello World” to the console in C programing language using other output functions without printf() function. There are many functions used to print “Hello World” on the console screen in C programming language such as putchar(), puts(), write() etc. You can run all the below programs in VS Code. So, you have to install VS Code on your PC.
Print “Hello World” by putchar() :
The putchar() function is used to print output (“Hello World”) on the console screen. It displays only a single character at a time, but you can print more than one using this function. Here, I show you how to print “Hello World” using putchar() function in C programming language.
/* Developd by Puskar Jasu*/
#include <stdio.h>
int main()
{
char str[] = "Hello World";
int i = 0;
while (str[i] != '\0')
{
putchar(str[i]);
i++;
}
putchar('\n');
return (0);
}
Output :
When you run the above code on your PC, you can see the following output.

Print “Hello World” by puts() :
The puts() function is another output function in C language that can be used to write strings to the console. The below code shows you how to print “Hello World” using puts() function in C programing language. This function uses to print the output on the screen. For this, you have to pass a variable as a string. It prints the string in the new line.
/* Developd by Puskar Jasu*/
#include <stdio.h>
int main()
{
char str[] = "Hello World";
puts(str);
return 0;
}
Output :
Now run the above code on your PC and see the output like below image.

Print “Hello World” by write() :
The write() function is another output function that can be used to write strings to the console. The below code shows you how print “Hello World” using write() function in C programming language.
/* Developd by Puskar Jasu*/
#include <stdio.h>
int write(int filedes, const char *buf, unsigned int nbyte);
int main()
{
write(1, "Hello World\n", 13);
return 0;
}
Output :
Run the above code and see the following output.

Conclusion :
The printf() function is commonly used to print “Hello World” in C programming language. But in this article, you can see that there are alternative ways to get the same result using functions like putchar(), puts() and write(). In this post I also show you how you print “Hello World” without any output function. Thanks for visiting my site.