Purpose of this program is to get familiar with the syntax of C programming language. In this program we have printed a particular set of words, to print whatever you want to, see C program to print a string.
Output of program:
Download Hello world C program.
C hello world progam using character variables
As you can see we have used seven character variables in the program and '%c' is used to display a character variable, it is just another method. See easy and efficient ways to do the same in the following programs.
Hello world program in C language
We may store "hello world" in a string (A character array) and then print it.
Output of program:
If you didn't understand this program don't worry as you may not be familiar with the strings yet.
C program to print hello world a number of times
Using a for loop we can display it a number of times.
Displaying hello world indefinitely
While loop will execute forever as while(1) is always true. To terminate the program press (Ctrl + C)/(Ctrl + Q).
0 Comments
If you have any doubts,please let me know