Thursday, 3 April 2014

How we declare Variables in C

Hello Friends I m here to share today how we declare variable use in C language.

 Lets Start :)
 We are using mostly 3 or for types of variables how much i know i try to explain in C . 
:) 

Types of variables 
1 Integer          ----------> 0 1 2 3 4 5 6 7 8 9 
2 Character     ----------> a -z or A-Z
3 Float            ---------->  1.0 ,1.11 or etc like this which are we use decimals 
4 Var Char    -----------> In this type of variables we are store the no and alphabets together


How we Declare all that types Variables In C language 

Integer :-
                 int a ,b,c;

Here a b or c are the integer variables 


Character :- char d,e,f;

Here are d e or f are the characters.

Float :- float g,h,i;

Here g h or i are the floats .

Varchar :-  VARCHAR  a ,b ,c ;

Here we are declare the a b or c is the varchar variables in c.


How to set length in C character or Varchar ?


Character length :-    char a[10];
In this we are enter the value of a is less then or equal to 10 if we are trying to store the more then ten words the we are not get success.

Varchar length:- VARCHAR a[20];

Same as character we are able to store the 20 character in this type of varchar variables

Thanks For reading if any mistake the plz comment and after ur feedback we are fix the problem.

                                                   JAI HIND 
                                                 JAI BHARAT 

2 comments:

Fantastic blog!!! Thanks for sharing with us, Waiting for your upcoming data.
How Cloud Computing Helps Business
Cloud Computing For Small Business

Post a Comment