MIKROC VARIABLE NAMES AND TYPES

on Monday, 23 September 2013
In this post we will look at the mikroC variable names and its types and its predefined memory.

VARIABLE NAMES:
Rules for the variable names in mikroC is similar to C language, check the points which are given below.

  • Variable names can begin with an alphabetical characters or with underscore character i.e it can be any characters a to z and A to Z, the digits 0 to 9, and underscore " _ " .
  • Each variable name should be unique with 31 characters at most.
  • Variable names can be mixed with upper and lower case characters.
  • Names which are reserved for the compiler cannot be used. 
One important different between normal C and MikroC is that MikroC is not case sensitive i.e upper and lower case characters are considered one and the same. Look at the names below all of them are considered as same.

Name                    nAme                        naMe                          namE


VARIABLE TYPES:
MikroC supports the variable types which are shown below , if you want to know more then just go to the 'help' section of your MikroC compiler.

Asm
do
if
static
auto
double
int
struct
break
else
long
switch
case
enum
register
typedef
char
extern
return
union
const
float
short
unsigned
continue
for
signed
void
default
goto
Size of
Volatile and while






 Let us see few important types which we are going to use frequently in our programming. 

Unsigned Char or Unsigned short int :
The range of the type is 0 to 255 i.e it is of 8 bits i.e the variables of this type cannot hold the value which is more than 8 bits i.e more than 255 .
Declaration is something like this shown below 

unsigned char variable_name  ; 
or
char variable_name;

Example: unsigned char xyz; 
xyz variable can hold upto 8bit length. 

Signed char or signed short int :
They are also 8 bits but they are signed character variable i.e range from -128 to +127. 

Signed char variable_name;
or
Short variable_name;
or
short int variable_name;

Example: signed char abc ; 
              or you can declare as " signed char abc=-20 ;" 

Signed int: 
It is of 16 bits i.e -32768 to +32767
int variable_name;

Unsigned int:
It is also of 16bit wide ranges from 0 to 65535.
Unsigned int variable_name;

Signed long int:
It is of 32bits ranges from -2147483648 to + 2147483647. 
Signed long variable_name; 

Unsigned long int:
It is also of 32 bits ranges from 0 to 4294967295.
Unsigned long variable_name;

Double or long double:
To represent the floating point numbers we use double or long double types they ranges from + or - 1.17549435082E-38 to + or - 6.80564774407E38.

From the above which i have mentioned "unsigned char, int" are used frequently in our programming.
AUTHOR: YOUSTRON SIC


6 comments:

Aman Rustagi said...

Here is the Sample C programs for range of various data types in C. Check here the rules for writing C variable names.

madin said...

Rolex Watch 038 Price
Tag Heuer Watches Of Switzerland
Best Watches Quora
G Shock Copy Watches Uae
Bell
Tag Heuer Watches On Ebay Uk
Cheap Watches Daniel Wellington
Best Watches For 7 Year Olds
Replica Watches Iwc
Breitling Watches Melbourne

velraj said...

This is a very nice post I m very like it and I appreciate you for good work keep it up it is very useful for me.
javascript training in chennai
javascript classes in chennai
javascript course fees in chennai
javascript training in OMR
core java training in chennai
C C++ Training in Chennai
Appium Training in Chennai
JMeter Training in Chennai

Sivanandhana Girish said...

I would like to thank this blog admin for sharing this worthy information with us. Keep doing more.
Spoken English Class in Chennai
Spoken English in Chennai
IELTS Training in Chennai
IELTS Chennai
Best English Speaking Classes in Mumbai
Spoken English Classes in Mumbai
IELTS Mumbai
IELTS Center in Mumbai

dhivya said...


Great Blog!!! Was an interesting blog with a clear concept. And will surely help many to update them.
Machine Learning course in Chennai
Machine Learning Training in Chennai
Data Science Course in Chennai
DevOps Training in Chennai
RPA Training in Chennai
AWS Training in Chennai

htop said...

nice blog
best devops training in chennai
data Science training in chennai
 devops training in chennai
best hadoop training in chennai
best hadoop training in omr
hadoop training in sholinganallur
best java training in chennai

Post a Comment