Data types in c programming language :

 Data types in c programming language :



Integer (int) :- 

stores positive and negative whole numbers, such as 10,12,65,3400

Datatype : int

Size : 2 or 4 bytes 

Example : 10 ,13,90


Character (char) :-

stores all the character AACLL character sets whinin single a votes such as 'a' , 'A'

Datatype: char 

Size : 1 bytes 

Example : 'a' , 'A'


Floating point (float) :-

Stores real numbers values or decimal points .

Datatype : float

Size : 4 bytes 

Example : 3.47 , 20.54


Double (double):-

Stores high precision floating point numbers or store in computer memory. 

It can stores upto 10 digits values after the decimal place , unlike float that supports only upto 6 digits .

Datatype: double 

Size : 8 bytes



Pdf file full information about data types 

Open or download pdf file 

https://drive.google.com/file/d/1-ZoTfsG0tTHuqaQRDv6f2AwCZ75vNzDD/view?usp=drivesdk


//Write a program to demonstrate the data types..

#include<stdio.h>

int main()

{

int a=25;

float b=3.14;

char c='a';

printf("the value of a is %d\n",a);

printf("the value of b is %f\n",b);

printf("the value of c is %c\n",c);

}

//Write a program to demonstrate the data types.

https://kodewithgy.blogspot.com/2024/09/write-c-program-to-demonstrate-int-data.html

Post a Comment

Please Select Embedded Mode To Show The Comment System.*

Previous Post Next Post