Introduction to Primary Data Types

Introduction to Primary Data Types

Ram, a curious student who wants to learn DSA and started with primary datatypes.

No alt text provided for this image

Ram is confused after looking at various datatypes like integer, character, float, double, Boolean etc.

Ram immediately confused and he asked himself that, what are these datatypes and why are these many datatypes? If I have a value can’t I store it in any datatype? Bheem correctly said it's hard to understand programming.

No alt text provided for this image

Ram immediately backed off the table and started watching reels until his mom calls him to get various household items from the market.

He has gone to the market with a list written by his mom. He visited different stores to buy different items in the list and finally returned home with all the items.

At home his mom unpacked all the items Ram bought. Here Ram has noticed that, different items were packed differently.


When he bought vegetable oil, the shopkeeper gave it in a bottle.

The vegetables are packed in a paper bag.

Sweets are packed in a box.

While observing so, his father arrived home with a lens box for his latest specs.

Now after noticing everything, Ram is silently wondering....

Why not Oil is not packed in a paper bag?

Why not vegetables are bottled?

Why not his new lens are bought in a tumbler?

No alt text provided for this image
No alt text provided for this image


Finally in the night around 10pm when Ram went to his bed, he understood that he can relate what happened today to the datatypes he’s trying to understand this morning. Different type of values can only be stored in different datatypes and the reason there are different datatypes in Programming language.

His doubt got clarified with basic household work and he hopes that everything is as easy to understand like he did today and he went to sleep.

Different Datatypes:

No alt text provided for this image
Primary Datatypes


Natesh G S

Copywriter for health & wellness founders/coaches

1 年

The Best Analogy and explanation. ?? This is so casual and so relatable. They way you added real life examples to connect with And images to visualise them are ?? Great work Putta Hemanth Kumar

Achyut Anand

Student of b-tech (CSE)

1 年

Easy and Informative...

要查看或添加评论,请登录

Putta Hemanth Kumar的更多文章

  • Merge Sort Technique

    Merge Sort Technique

    Ram is determined to conquer the formidable Merge Sort, a sorting algorithm that had always been a bit of a puzzle for…

  • Binary Search Algorithm

    Binary Search Algorithm

    Ram, who is passionate about coding had managed to learn all the fancy data structures, much to the amazement of his…

    2 条评论
  • Introduction to Stacks

    Introduction to Stacks

    Ram, had recently completed his studies on arrays and linked lists, and now he was ready to embark on a new data…

  • Introduction to Linkedlist

    Introduction to Linkedlist

    Ram has completed his learning and practice in array data structure, He understood all the pros and cons of arrays, Now…

  • Introduction to Array Datastructure

    Introduction to Array Datastructure

    Ram understands very well that in order to tackle any programming challenge, he must learn about data structures and…

  • A brief Introduction to DSA

    A brief Introduction to DSA

    Ram, who is knowledgeable about various programming datatypes and functions, wanted to learn more about data structures…

  • Introduction to Functions

    Introduction to Functions

    Ram, has learned and experienced what are primitive datatypes and what are user defined datatypes. Now he tries to…

  • Introduction to Structures and Classes

    Introduction to Structures and Classes

    Ram, now has a good clarity on Primitive Datatypes, now he’s learning User defined datatypes. While doing so he…

社区洞察

其他会员也浏览了