|
|
C Programming | Tutorial for Beginners |
ByDeeksha
21.7.2017
Phone:9918697448
Mail Now
|
A simple C program to display "Hello, World!" on the screen. Since, it's a very simple program, it is often used to illustrate the syntax of a programming language.
Program to Display "Hello, World!"
#include
int main()
{
// printf() displays the string inside quotation
printf("Hello, World!");
return 0;
}
How "Hello, World!" program works?
Data Types Associated With Variables
In this section we are only going to discuss about the local variables. These are the variables that are used within the current program unit (or function). In later section we will have a look on global variables which are available for all program’s functions.
There are five basic data types associated with
variables:-
1. int – integer: a whole number
2. float – floating point value: i.e., a number with a fractional part.
3. double – a double- precision floating point value.
4. char – a single character.
5. void - valueless special purpose type which we will examine in later
sections.
If you want to learn C programming, join C language course at ETL Labs, Gomti Nagar, Lucknow.