hello world in C

problem

Learning programming always involves writing the classic “Hello World” program. In this post we will see how to do that in one of the smallest but pioneering and legendary programming languages. The C programming language. One of the ways to execute the code below is by using GCC – GNU Compiler Collection.

SOLUTION

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

hello.c
				
					#include <stdio.h>

int main(int argc, char **argv){
    printf("Hello World!\n");
    return 0;
}
				
			
compile
				
					gcc hello.c
				
			
running
				
					./a.out
				
			

If compiling and running on Windows, it should create and execute the responsive .exe file

output

Below you can see it handwritten (in 1978) by Brian Kernighan one of the creators of the C programming language.

conclusion

Showing this program is a must for every new programmer in C.

Share it!

Facebook
Twitter
LinkedIn
Reddit
Picture of Ellion

Ellion

Professional IT consultant, writer, programmer enthusiast interested in all sorts of coding.
Eats all cookies 🍪

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x