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

C Hello World 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.

To Download and Install Code::Blocks IDE:

https://www.testingdocs.com/download-and-install-codeblocks/

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 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, 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!!
*****************

 

 

External Link

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

Dissecting a C program

C Tutorials /

Dissecting a C program

Getting Started with the First C Program

C Tutorials /

Getting Started with the First C Program

In this post, we will develop C Program to generate Fibonacci sequence into rows and columns as output. We get the Fibonacci sequence nth term

C Tutorials /

C Program to generate Fibonacci sequence into rows and columns

Sum of Even Numbers C Program

C Tutorials /

C program to find sum of even numbers from 1 to n

Understanding a Simple C Program

C Tutorials /

Understanding a Simple C Program

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

Recent Posts

  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • RAPTOR Editions
  • Flowgorithm Conditional Breakpoint Statement
  • Flowgorithm Read Numbers from File Example
  • Search Text File Flowchart Example
  • Flowgorithm Turtle Graphics Symbols
  • Draw Circle using Flowgorithm Turtle
  • Draw Parallel Lines using Flowgorithm Graphics

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version