Variables vs Constants - Deepstash
Machine Learning With Google

Learn more about computerscience with this collection

Understanding machine learning models

Improving data analysis and decision-making

How Google uses logic in machine learning

Machine Learning With Google

Discover 95 similar ideas in

It takes just

14 mins to read

Variables vs Constants

Variables vs Constants

Variables and Constants are mostly misunderstood in programming. Most of the time, most of the people read bad definitions on Constants. A thread on this.

8

83 reads

MORE IDEAS ON THIS

<p>Values stored in memory can...

Values stored in memory can't be accessed without knowing the address. Since we can't remember addresses, we need some kind of label which points to that address. Something like a contact number saved in the phone. We can’t remember phone numbers, but we can remember names.

{8/9}

8

13 reads

First of all, we need to understand the usage of both variables and constants. Variables are used to store values which can be changed in run time whereas constant cannot be changed.

{1/9}

8

20 reads

So, both "Variable" and "Constant" come under a concept called "Identifiers". As the name suggests, identifiers help us to identify a value which is stored in the memory with the help of a name. It's like a box which contains some values/information with a label attached.

{4/9}

8

11 reads

Also Also identifiers can be function names, type names, class names, labels, etc.,can be function names, type names, class names, labels, etc.,

{9/9}

8

18 reads

But some of the websites/people explain these two in the wrong way. Mostly the definition for constant would be "A constant is a variable that can't be changed in the program".

{2/9}

8

24 reads

It totally makes no sense. This statement states that a CONSTANT is a VARIABLE but it's value can't be changed. If CONSTANT is a VARIABLE then the value can be changed. A total collapse in the meaning.

{3/9}

8

12 reads

Say if you wanna store a number "42" in your program/code, you can assign it to an identifier. So that you can use it later in your program.

{5/9}

8

11 reads

If a value stored in an identifier which can be changed in the run time, it is called a "Variable". If it cannot be changed it is called a "Constant".

{6/9}

8

11 reads

CURATED FROM

CURATED BY

djhemath

A self-taught software developer, obsessed with product ideas. I love to sleep, travel, make music and meeting people in person.

Related collections

More like this

The Variables Of Life

Where you are right now is a sum total of your starting point, your character and your environment.

Our character, personality traits, behavioural patterns, level of awareness, and decision-making skills form a set of variables that define the outcome of our life. Another ...

Ordered Vs Wicked Environment

Ordered environment is an environment with a stable, repetitive, and controlled situation in which we can predict what could be happen inside it. Specialist people tend to have a benefit from this kind of environment. Example : Chess game & computer programming

Wick...

Research planning: Towards an analysis

Write a short statement of about 250 words about the kind of data that would help address your research and how you'd analyse it.

  • What are the main concepts or variables in your project? Include brief definitions.
  • Do any data sources exist on those concepts, if ...

stash-superman-illustration

Explore the World’s

Best Ideas

200,000+ ideas on pretty much any topic. Created by the smartest people around & well-organized so you can explore at will.

An Idea for Everything

Explore the biggest library of insights. And we've infused it with powerful filtering tools so you can easily find what you need.

Knowledge Library

Powerful Saving & Organizational Tools

Save ideas for later reading, for personalized stashes, or for remembering it later.

# Personal Growth

Take Your Ideas

Anywhere

Organize your ideas & listen on the go. And with Pro, there are no limits.

Listen on the go

Just press play and we take care of the words.

Never worry about spotty connections

No Internet access? No problem. Within the mobile app, all your ideas are available, even when offline.

Get Organized with Stashes

Ideas for your next work project? Quotes that inspire you? Put them in the right place so you never lose them.

Join

2 Million Stashers

4.8

5,740 Reviews

App Store

4.7

72,690 Reviews

Google Play

samz905

Don’t look further if you love learning new things. A refreshing concept that provides quick ideas for busy thought leaders.

Shankul Varada

Best app ever! You heard it right. This app has helped me get back on my quest to get things done while equipping myself with knowledge everyday.

Ashley Anthony

This app is LOADED with RELEVANT, HELPFUL, AND EDUCATIONAL material. It is creatively intellectual, yet minimal enough to not overstimulate and create a learning block. I am exceptionally impressed with this app!

Sean Green

Great interesting short snippets of informative articles. Highly recommended to anyone who loves information and lacks patience.

Jamyson Haug

Great for quick bits of information and interesting ideas around whatever topics you are interested in. Visually, it looks great as well.

Laetitia Berton

I have only been using it for a few days now, but I have found answers to questions I had never consciously formulated, or to problems I face everyday at work or at home. I wish I had found this earlier, highly recommended!

Giovanna Scalzone

Brilliant. It feels fresh and encouraging. So many interesting pieces of information that are just enough to absorb and apply. So happy I found this.

Ghazala Begum

Even five minutes a day will improve your thinking. I've come across new ideas and learnt to improve existing ways to become more motivated, confident and happier.

Read & Learn

20x Faster

without
deepstash

with
deepstash

with

deepstash

Access to 200,000+ ideas

Access to the mobile app

Unlimited idea saving & library

Unlimited history

Unlimited listening to ideas

Downloading & offline access

Personalized recommendations

Supercharge your mind with one idea per day

Enter your email and spend 1 minute every day to learn something new.

Email

I agree to receive email updates