Friday, June 27, 2008

some points on declartion,intialinsation and data type in C

* When ever their is conflict b/ween local and global variable ,local always win. i.e if we have declare two variable with same name & we call the variable then the local variable value will be shown.

*Their is 4 kind of scope of variable where it exits-:


1.function
2.block
3.file
4.prototype

* In declaration the nature of the variable is define no storage is allocated,while in definition the variable is created or assigned the value.

*Redefinition is error while redeclaration is not error.


>Data type Point

*A 16 bit compiler means that when it compiles a c program it generate machine language code that is targeted towards working on a 16 bit microprocessor,like intel 8086/88

~vc++ is 32 bit compiler target for Intel Pentium.

*Range of intezer constant depends on the compiler

~for 32 bit compiler range=-2147483648 to 2147483647
~for 16 bit compiler range =-36768 to 36767

* Intel itanium processor does not support 16 bit code.

* The highest bit (16th or 32 bit) is use to store the sign of integer 1 is for -ive & 0 for +ive.

* Signed char has range -127 to 128.

* Float occupies 4 bits
~ range -3.4 e 38 to 3.4 e 38

* tc/tc++ perform all float operation using a s/ware piece called 'Floating Point Emulator'.
~This emulator becomes part of exe file,thereby increasing its size.

* There is always one extra number on the -ive side. This is because a -ive number is always store in 2's compliment.

1 comment:

Anant Khaitan said...

Hi.. your post was quite handy but difficult to go through.. Use a spellchecker and if possible mind your grammar (no offense) just an constructive criticism.
I am from Bhopal too..