TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

C Tutorials

Hello World C Program

Overview

C is a popular programming language. It is reliable, simple, and easy to use. We would write the first C program in this post i.e to print Hello World.

The IDE used is Code::Blocks:

Download and Install Code::Blocks IDE:

 

C Program 

#include <stdio.h>
/*
* Program to say Hello World...
*/

int main()
{

printf("*****************n");

printf("Hello World!!n");

printf("*****************n");

return 0;

}

 

 

 

Comments are enclosed within /* */.

Program description and information can be included in the comments. It is a good practice to begin a program with a comment indicating the purpose of the program, its author and date, etc.

main() and printf() are functions in C. For example, the printf() function is used to display content on the screen. Mostly printf is to print values in variables.

The general form of printf( ) function is:
printf ( “”, ) ;


Once you have written the program you need to compile and execute it. The steps depend on the IDE and operating system you have used to write the C program. Using Code Blocks IDE on Windows you can build, compile and run the program using F9 keyboard shortcut.
Alternatively, you can use the menu options provided by the IDE to run the program.

Program Output

*****************
Hello World!!
*****************

 

 

—

C Tutorials

C Tutorials on this website can be found at:

https://www.testingdocs.com/c-language-tutorial/

Code::Blocks Offical website

For more information on Code Blocks IDE, visit the official website of Code blocks IDE:

http://www.codeblocks.org/

Related Posts

C Language Characteristics

C Tutorials /

C Language Characteristics

C Source Code .c File

C Tutorials /

C Program Files & Formats

GNU Compiler Collection GCC

C Tutorials /

C Compilers

C Pointers

C Tutorials /

C Pointers

C Tutorials /

C Two-Dimensional Arrays

‹ C Program to generate Fibonacci sequence into rows and columns› Getting Started with the First C Program

Recent Posts

  • Update draw.io on Windows
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows
  • Activate CLion IDE
  • CLion IDE for C/C++ Development

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com