basic data types in c |data types in c with examples

basic data types in c |data types in c with examples

Basic data types in c :- C Programming Me Three Type Ke Data types hote hai. Pahla primary data types in c or second secondary data types in c or user defined data types in c, hote hai. inko ham ek ek example ke sath samnjte hai.

basic data types in c

Sabse Pahle Ham Primary Data types ko samanjte hai kyoki c programming me data types pahle use hone wale primary hai.kyoki jab ham koi new programming learn karte hai to ham pahle start se shuru karte hai.

what are data type c programming ?

C supports three classes of data types

Data Type in C

  • Primary Data types
  • Secondary Data types
  • user defined data types

Primary Data types in c

Primary Data types me 4 data type aate hai. inhe ham ek list se samnjte hai or inka example dekhte hai & inka bits bhi kitna use hota wo bhi dekhte hai.

  • integer ( 2 bits ) = int (%d)
  • character ( 1 bits ) = char (%c)
  • float ( 4 bits ) = float (%f)
  • double ( 8 bits ) = double (%f)

aap dekh sakte hai primary data types ko ab ham inhe ek example se understand karte hai.

Example :-

#include<stdio.h>
#include<conio.h>
 
void main()
{
  int a;
  float b;
  char name;
  double c;

  printf("Enter The Your Name & age & percentage & marks :\n");
  scanf("%s %d %f %f", &name , &a, &b , &c);
  
  printf("Your Name is %s",name);
  printf("Your Age is %d ",a);
  printf("Your Percentage is %f",b);
  printf("Your Marks Is %f",c);

getch();
}

Output :-

Enter The Your Name & age & Percentage & marks :
Danish 18 72.2 72

Your Name is Danish
Your Age is 18
Your percentage is 72.2
Your Marks is 72

App Dekh Sakte Hai Hamne Primary Data Types Ka example Karke Understand kiya hai agar phir aapko samnj ne me dikkat hoti hai to aap mujhe comments likh sand kar sakte hai.

Secondary Data Types In C

Secondary Data types in c me 5 data type aate hai. inhe ham ek list se samnjte hai .

  • Arrays
  • Structures
  • Unions
  • Functions
  • Pointers

Aap Dekh Sakte hai secondary data types me 5 data types hote hai. inhe ham jab use karte hai jab hme thora advance program create karna hota hai. inke example ham aage ki post me dekhenge kyoki aapko understand karne mei thori dikkat hogi or bhi confuse ho jaoge joki mei nhi chata.

user defined data types in c

user defined data types me 2 data type aate hai. inhe ham ek list se samnjte hai .

  • typedef
  • enumerated data type

Aap Dekh Sakte hai user defined data types keval two aate hai ham inke example next post me understand karenge.

C Programming | Full Course C programming language

Dosto mujhe ummed hai ki aap Data types in c ko acchi tarah se samanj gye honge agar aap ko ye post acchi lage to mere is website ko jarur follow kre or ha agar aap video bhi dekhna chahte hai to aap mere channel ko bhi subscribe kar sakte hai. channel ka link aapko home page par mil jayega |

Danish Ali

I Am a 1st Sem BCA Student & I have Skills C, C++ ,Python, HTML,CSS, Computer & Advance Hacking & Blogger & YouTuber.

Leave a Reply

Your email address will not be published. Required fields are marked *