Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4109484
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T21:48:11+00:00 2026-05-20T21:48:11+00:00

I guess this isn’t strictly programming, but I’ve been pondering this for a little

  • 0

I guess this isn’t strictly “programming”, but I’ve been pondering this for a little while. When you create a variable and assign it a value, the computer allocates a certain number of bytes for said variable and stores the value, but how does it know what type of data is in that memory address when it comes back to use it later?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T21:48:11+00:00Added an answer on May 20, 2026 at 9:48 pm

    Generally, it doesn’t. Well, most dynamic languages have something like typeof, so usually there’s an “object header” storing some metadata, including type (and other information, e.g. refcount). But you still can’t identify the start of an object in a random chunk of memory (it’s all 1s and 0s, after all), so you need a pointer to it at all times…

    Traditional static/compiled languages (usually, of course) don’t store such information. After all, if compiler knows that x is an int, it knows how many bytes it needs to load into registers and which opcodes to use for additon. Even when you add virtual functions, you merely need to compile a table of function pointers (with no further metadata needed – obj->foo() translates to “fetch nth entry of vtable and call it” instead of “call code at this address”).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Before I begin, I guess this may not be strictly programming related but I
So I guess this isn't technically a code question, but it's something that I'm
This isn't exactly specifically a programming question (or is it?) but I was wondering:
We've got a few common libraries (C# but I guess this isn't platform- or
I guess this question isn't only specific to YUI, but that's the JS library
I guess this is similar to what Facebook does, but...I haven't worked out how
I guess this is kind of an odd question but I have tried setting
I guess this is fairly simple for you but i cant wrap my head
I guess this is simple, but i couldnot figure it out. i have a
I guess this question will sound familiar, but I am yet another programmer baffled

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.