Print Hello World C Program

C Program To Print Hello World

Learn How To Print Hello World in C Programming Language in Linux Ubuntu OS. Here, we have also explained how to execute hello world c program in Linux Ubuntu.

This is the very first program in every programming language. It helps to understand the basics of input and output of any programming language.

Method 1: C Program To Print Hello World Program in Ubuntu

Must Read: C Program To Print Hello World without Semicolon

Method 2: Hello World Program in C Programming using Command Line

Must Read: C Program To Check if Number is Armstrong or Not

Method 3: Print Hello World C Program using String

Must Read: Find Simple Interest in C Programming

Method 4: C Program To Display Hello World using Macro

Must Read: C Program To Swap Two Numbers using Call By Value

Steps To Execute Hello World C Program in Linux Ubuntu

  • Create a Text File (using gEdit) named HelloWorld.c on Linux Ubuntu Desktop.
  • Paste the above code into the Text file and Save it with a .c extension.
  • Open Ubuntu Terminal by pressing Ctrl+Alt+T.
  • Type: cd Desktop and Hit Enter.
  • Type:gcc HelloWorld.c and Hit Enter. This step helps in Compiling C Programs.
  • To Execute the program, use the command ./a.out.
  • Now, you would be able to see the Output as Hello World on the Terminal.

Must Read: C Program To Find Factorial of a Number


C Program To Print Hello World

If you have any compilation error or doubts in this C Program To Display Hello World, let us know about it in the Comment Section below.

Tushar Soni

I am Tushar Soni, Co - Founder of CodingAlpha. I am a computer science student from India and passionate about Web Development and Programming. Connect with me on Facebook | LinkedIn | Google Plus

2 thoughts on “Print Hello World C Program

  • August 26, 2016 at 11:43 pm

    You have used Hello World statement in Command Line Hello World Code. We have to print hello world in Command Line as arguments.

    • August 26, 2016 at 11:47 pm

      We have passed default values here. If you want then you can remove this default value and pass your Hello World statement via command line. No issues in that.


Join The Discussion