You are on page 1of 1

Hello World - The first program write.

In C , the program to print “hello , world” is


#include <stdio.h>
Main()
{
Printf(“Hello world\n ”);
}
.C – The file name ends.
Example: hello.c

C Function – are like the subroutines and functions.


Fortran - the procedures and functions of Pascal.
Main – will usually call other functions to help perform
its job.
\n – escape sequence.
\t – tab
\b – backspace
\” – double quote
\\ - backslash.
Comment – this case explains briefly what the program
does.
Int – Integers
Float – floating point
Char – characters –a single byte
Short – short integer
Long – long integer
Double – double – precision floating point

Print as:
%d – decimal integer.
%6d – as decimal integer at least 6 characters wide
%f – floating point.
%6f - as floating point at least 6 characters wide
%.2f- as floating point 2 characters after decimal point
%6.2f- as floating point at least 6 wide and 2 after
decimal point.
%o – for octal
%x – hexadecimal
%c – character
%s – character string
%% - itself.

Symbols constant:
Name – the same form as a variable name
Replacement text – can be any sequence of characters.
Text stream – is a sequence of characters divided into
line.

You might also like