Friday 23, June 2017
Welcome Guest, Register | Login  
      Home    |    Tutorials    |    Free Ebooks    |    Free Scripts    |    Articles    |    Blog     |    About Us    |    Contact Us

Constants and Variables

C Constants:
The alphabets, numbers and special symbols when properly combined form constants, variables and keywords. A constant is an entity that does not change.

Variables:
A variable is an entity that may change it value. In any program we typically do lots of calculations. The results of these calculations are stored in computer memory locations. To make the retrieval and usage of these values we give names to the memory locations. These names are called variables.

Keywords:
A keyword is a word that is part of C Language itself. These words have predefined meanings and these words cannot be used as variable names.

C Keywords

char

signed

break

for

auto

const

sizeof

case

if

extern

double

struct

continue

goto

register

enum

typedef

default

return

static

float

union

do

switch

volatile

int

unsigned

else

while

long

void

short

Types of Variables
There are two main types of variables in C: numeric variables that hold only numbers or values, and string variables that hold text, from one to several characters long.

Basic fundamental data types in C Language

 

 

 

Name
Description
Size
Range
char
Character or small integer.
1byte
signed: -128 to 127
unsigned: 0 to 255
short int
Short Integer.
2bytes
signed: -32768 to 32767
unsigned: 0 to 65535
long int (long)
Long integer.
4bytes
signed: -2147483648 to 2147483647
unsigned: 0 to 4294967295
bool
Boolean value. It can take one of two values: true or false.
1byte
true or false
float
Floating point number.
4bytes
+/- 3.4e +/- 38 (~7 digits)
double
Double precision floating point number.
8bytes
+/- 1.7e +/- 308 (~15 digits)
long double
Long double precision floating point number.
8bytes
+/- 1.7e +/- 308 (~15 digits)

 

 

 

 

 

 

 
     
   
C Language Tutorial
 
  Introduction
Introduction
  First Program
First Program
  Constants and Variables
Constants and Variables
  Loops
Loops
  Control Structure
Control Structure
  Functions
Functions
  Pointers
Pointers
  Arrays
Arrays
  Strings
Strings
  Structures and Unions
Structures and Unions
  File Handling
File Handling
  Graphics
Graphics
 
 
 
Web Designing Tutorials
  HTML Tutorial
HTML Tutorial
  DHTML Tutorial
DHTML  Tutorial
  CSS Tutorial
CSS Tutorial
  XHTML Tutorial
XHTML Tutorial
 
Programming Languages Tutorials
  C Language Tutorial
C Language Tutorial
  C++ Tutorial
C++ Tutorial
  Java Language Tutorial
Java Language Tutorial
  Data Structure Theory Tutorial
Data Structure Theory Tutorial
 
Server Side Scripting Tutorials
  PHP Tutorial
PHP Tutorial
  SQL Tutorial
SQL Tutorial
  ASP Tutorial
ASP Tutorial
 
Client Side Scripting Tutorials
  JavaScript Tutorial
JavaScript Tutorial
  VBScript Tutorial
VBScript Tutorial
 
 
 
POPULAR E-BOOKS
 
Download An Introduction to Computing  Ebook An Introduction to Computing
   
Download Algorithms for Programmers  Ebook Algorithms for Programmers
   
Download Tellman s List Building Club Ebook Tellman s List Building Club
   
Download Article Marketing Profits Ebook Article Marketing Profits
   
Download Assemblers And Loaders  Ebook Assemblers And Loaders
   
     
Studiesinn.com 2017 All Rights Reserved.
 
Website Designed & Developed by TechXprtz