内存如何确定变量的数据类型? [英] How does memory determine data type of variable?

查看:111
本文介绍了内存如何确定变量的数据类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我将这个值存储在内存中,内存将如何确定它是字符串还是整数.如何将数据类型存储在内存中

suppose i have this value stored in my memory how will memory determine this is string or int .How datatype are stored in memory

推荐答案

内存不需要知道什么类型的数据以及在哪里存储.内存就是将值存储在带有地址的块中.

There is no need for the memory to know what type of data is being stored and where. Memory is just about storing values in blocks with addresses.

它是编译器的工作,以确定类型并从内存中获取适当的数据.

Its the compilers job to determine the type and fetch the appropriate data from memory.

这篇关于内存如何确定变量的数据类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆