0

what is the size of Ruby variable.

22nd Nov 2019, 7:45 PM
Balaji
Balaji - avatar
5 Answers
+ 1
B.Balaji I can’t say about differences because lack of C experience. But I can say that Ruby uses pointer for a variable that adresses to the actual object. But it is not true for types like Boolean, Nil, Fixnum because they are not actually objects, they are immediate values https://www.linuxtopia.org/online_books/programming_books/ruby_tutorial/Extending_Ruby_VALUE_as_an_Immediate_Object.html
7th Dec 2019, 2:18 AM
Alex Tatarnikov
+ 2
I believe the question is vague. Are you able to provide a description to explain? https://www.google.com/amp/s/www.geeksforgeeks.org/ruby-data-types/amp/
22nd Nov 2019, 7:56 PM
Manual
Manual - avatar
+ 1
How much memory do you have?
7th Dec 2019, 1:06 AM
Alex Tatarnikov
+ 1
sorry I have a memory more than 16 bytes of memory for a mathematical calculation that integer values it contains of 20 numbers and how a Ruby variable works, what is defference between C and Ruby variable.
7th Dec 2019, 1:10 AM
Balaji
Balaji - avatar
+ 1
B.Balaji If we are talking about what is a variable itself, variable - pointer in memory. C pointers on 64bit machines - 8 bytes, 32bit - 4 bytes.
7th Dec 2019, 1:33 AM
Alex Tatarnikov