C Data Types In Hindi

📔 : C 🔗

Programming में Data Type बहुत ही important concept है। क्योंकि Data Type के according ही हम variable define करते हैं और उनके लिए logic implement करते हैं।


पिछले topic में आपने Variables के बारे में पढ़ा और समझा , आपको याद होगा कि कोई भी variable define करने से पहले हमें उसका type define करते थे जिससे पता लगाया जा सके कि वो variable किस type की value hold करेगा। इस topic में आप उन्ही सब types के बारे में पढ़ेंगे।


Data Type का simply मतलब है किसी variable का type, जिससे हमें पता चल सके कि कोई variable किस type की value hold किये हुए है , या in future किस type की value hold करेगा।

C Basic Data Types

C language में Generally use होने वाले data types इस प्रकार हैं-

TypeKeywordSizeDescription
Integerint2 or 4 bytesयह बिना decimal points वाले whole numbers (पूर्ण संख्या) को store करता है।
Characterchar1 byteयह single character store करता है।
Floating pointfloat4 bytesयह fractional numbers को point के बाद 7 digits तक store करता है।
Double floating pointdouble8 bytesयह भी fractional numbers को point के बाद 15 digits तक store करता है।

C Basic Format Specifiers

इन basic types के variables को handle करने के लिए कुछ basic format specifiers भी हैं -

Data TypeFormat Specifier
int%d or %i
char%c
float%f
double%lf

C Data Type Example

CopyFullscreenClose FullscreenRun
#include <stdio.h>
int main() {
  int int_var = 90;
  float float_var = 15.99;
  double double_var = 15.99;
  char char_var = 'R';  
  printf("int variable : %d", int_var);
  printf("\nfloat variable : %d", float_var);
  printf("\ndouble variable : %f", double_var);
  printf("\nchar variable : %c", char_var);
  return 0;
}
Output
int variable : 90
float variable : 1519845401
double variable : 15.990000
char variable : R

Related Topics :

Rahul Kumar

Rahul Kumar

Hi ! I'm Rahul Kumar Rajput founder of learnhindituts.com. I'm a software developer having more than 4 years of experience. I love to talk about programming as well as writing technical tutorials and blogs that can help to others. I'm here to help you navigate the coding cosmos and turn your ideas into reality, keep coding, keep learning :)

Get connected with me. :) LinkedIn Twitter Instagram Facebook

b2eprogrammers