Data Types In C | Lesson-8 | Learn C Programming From Subhash K U

preview_player
Показать описание
This video talks about data types in a very descriptive and detailed manner.
In this lesson, you will be understanding
-what are data types in C
-why data types are needed in C
-how the data type works
-what are the different data types (int, float, long, char) and
-usage of data types and qualifiers in C programming.

To watch the next video of this C programming Series, click on the link below.

If you haven't yet watched the previous lesson of this series, make sure you watch it before moving further on this C programming series by clicking on the link below.

To be a part of our exclusive community on Telegram who are following this C programming series with you, make sure you click on the link below and join our Telegram Channel.

For notes, you can also refer the online book written by Subhash K U by following the link below.

Рекомендации по теме
Комментарии
Автор

Wts is 32bit and 64 bit storage in float and double

jesuspresence
Автор

subhash sir ! there is something important to tell you that as your YT video's views and likes getting decreases day by day don't let your energy to get low . We are all here to constantly listen you and support you. Subhash sir you are are excellent for all time I must say!! keep guiding us The views and likes can never define your excellence, you are more than that.

shubhamsonwane
Автор

float b=5.5f; according to you float stores [b=5.5] but my doubt is why is not store [b=5.5f]

ruturajjavanjal
Автор

Int-short int=2bytes, longing=4bytes:
Float=4bytes:
Double=8bytes:
Char=1byte

jesuspresence
Автор

for integer-2 or 4 bytes
for float-4 bytes
for double-8 bytes
for char-1 byte

syedawajahat
Автор

1) int → 2 (short) or 4 (long) bytes
2) float → 4 bytes
3) double → 8 bytes
4) char → 1 byte

abhishekgoswami
Автор

For int- 2 or 4 byte
Float- 4byte
Double-8byte
Char- 1 byte

shreeyawankhede
Автор

In c language 4 types of datatypes
1.int - int has divided in two types.
a. Short integer b. Long integer these are called qulifiers.in turbo c compiler short integer by default we will get 2 bytes. if you want 4 bytes you can write like this
long int and gcc compiler by default we will 4 bytes the integer size is depends on compiler
2.float data type we will get 4 bytes.
3.double data type we will get 8 bytes.
4. Character data type we will get 1 bytes. and it will character of ASCII value.

kasimanvenky
Автор

type of datatype :
Int : it could be 2 byte or 4 byte (short or long integer)
Float: it allocate 4 byte of memory
Char : it allocate 1 bye of memory
Double : it allocate 8 byte of memory .

_ganeshkasar
Автор

1) For int - The memory allocation is 2 for Turbo(By default value) or 4 for gcc (By default value) bytes .
Eg: int a=5;
2) For float - The memory allocation is 4 bytes.
Eg: float b=4.5;
3) For double - The memory allocation is 8 bytes .
Eg: double c=6.3;
4) For char - The memory allocation is 1 bytes.
Eg: char d='A';

behlahtinwala
Автор

Integers: 1)long 4byte[GCC]
2)short 2 byte [turbo C]
Float: 4bytes ex: float b=3.3; (4bytes memory )
Double: 8bytes memory
ex:double c=5.6;
Char: 1byte
ex: char d='b';

shreyamukkawar
Автор

Based on Complier int data type has 2 and 4 bytes of memory allocation
We can explicitly change the memory allocation of 2 or 4bytes by using qualifiers [short(2byte), long(4byte)]
short int a=1;
long int a= 8;
Float data type has 4 bytes
float a=1.1;
Double date type has 8 bytes
double a= 2.3;
Char data type has 1 byte
Char a='A';

dhanyam
Автор

for integer:- 2 bytes or 4 bytes depending on the compiler
for float:- 4 bytes
for double:-8 bytes
for char:-1 byte

komaljagtap
Автор

For integer - 2 or 4 bytes
For float - 4 bytes
For double - 8 bytes
For char - 1 byte

apurupareddykuppam
Автор

Int :
depending upon short & long int allocate 2 & 4 bytes respectively.

Double :8byte

Float : 4byte

Char : 1 byte

dipalipotdar
Автор

1.) Int datatype: It depends on the Compiler which we are using nd also depends on two main Qualifiers:
a) Short int - 2 bytes.
b) Long int - 4 bytes.

2.) Float datatype - 4 bytes.(32 - bit representation)

3.)Double datatype - 8 bytes.(64 - bit representation)

4.)Char datatype - 1 byte.
3.)

Thenmozhibca
Автор

Okay so int datatype is for int constant where there are 2 int i.e short and long int these short and long integers are called qualifiers.
Float has a 32 bit floating point of memory location.
Double has a 8 byte if memory location.
Char has a 1 byte of memory location where a variable gets stored but the variables ASCII value gets stored.

snehakhandale
Автор

There are 3 types of datatype in C language.

1. int datatype:
•It could be either 2 bytes or 4 bytes according to the compiler.

2. float datatype:
• Allocates 4 bytes of memory

3. double datatype:
• Allocates 8 bytes of memory

4. char datatype:
• Allocates 1 byte of memory

s_hilpa
Автор

for int data type there are 2 possibilities which depend on the compiler whether it considers the given variable short or long (known as qualifiers) and allocates a memory of 2 and 4 bytes
Ex: int a=5 (memory allocated=2 bytes) if int a=521 (memory allocation could be 4 bytes)

for float datatype memory allocation would be 4 bytes

Ex: float a=5.1 (memory allocation would be 4)

for double datatype memory allocation would be 8 bytes
Ex: double a=5.6(memory allocation would be 8 byte)

for char datatype memory allocation would be 1 byte and in memory location it wont store the exact character but the ASCII value of the character
Ex: char a="b" (memory allocation will always be 1 byte)

​ @Subhash Programming Classes sir i have a doubt regarding the float and double data type, i wonder why we using 2 different data types for the fraction values which looks the same and how do i know which know to use and when to use. i am little confused.
Thanks in advance sir

manojkumar-kope
Автор

There are 4 data types:
1. int ->variable associated with integer data type gets allocated by either 2 or 4 bytes depending on the compiler.
ex: int s=22;
2. float -> this data type tells compiler to allocate 4 bytes of memory to the variable associated with it. float is used to store 32 bit floating point constant.
ex: float m=19.22f;
3. double -> it tells compiler to allocate 8 bytes of memory to the variable associated with it. double stores 64 bit floating point constant.
ex: double a=12343.6785;
4. char-> it tells compiler to allocate 1 byte of memory to the variable associated with it. The character doesn't get stored instead the corresponding ASCII value is stored. The character is placed within single quotes
ex: char s='M';

sushmadoddamani
join shbcf.ru