Ads

Datatypes in C

suppose we are adding a+b here, what we have to do,

In Calculator we do 3+5 it shows 8. But in the case of Computer doesn't under 3+5, it only understand 0 and 1's.

This 3 and 5 Commonly known as Data, by using this input data we perform addition operation to get a result of 3+5. To store this 3 and 5 we need some variables like a,b etc.

Above diagram shows that a,b,c,d called as operands (variables) to store value and all the values are stored somewhere in the computer memory. suppose if your data is a integer type address will be multiples of 2.

Ex: Starting address is 1000 for a and b addressing is 1002. i.e one variable occupy 2 bytes of memory.

Datatypes in C,


Here Integer - 1,2,3,1000,50000,99000 called as integer .. all decimal values

floating point values - 1.000,1.2333,0.89 etc.

Character values - a to z, A to Z,1-10,all keyboard symbols.

Void - Null Values.

String- Group of Characters called as  string. ex- "hello"

All the data present in the world will come under this datatypes.

Integer(int) - 2 byte or 4 byte of memory
floating point(float) - 4 or 8 or 10 byte of memory
character (char) - 1 byte of memory


Primary data types in c

Comments

Popular posts from this blog

Installing Anaconda on Windows.

GLCM Image features extraction using glcmcomatrix.