answersLogoWhite

0


Best Answer

In C/C++ when we declare a variable;

e.g

int var;

for this variable (i.e. var) memory is being reserved in RAM (i.e out side processor).

If we declare variable like that;

register int var2;

for this variable memory is being reserved in register of CPU (i.e. withing processor)

But register variables are discouraged because processor has to work with registers.....

Note: strictly speaking, storage class 'register' means: dear compiler, you might optimize this variable into register, as I won't ever request its address. But of course, it's up to you to decide.

User Avatar

Wiki User

โˆ™ 2010-05-06 14:31:33
This answer is:
User Avatar
Study guides

Statistics

20 cards

What are the brain's association areas

What is a field hockey stick made of

How old is she is rebecca stevenson

When during pregnancy should one quit smoking

โžก๏ธ
See all cards
4.03
โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…
29 Reviews

Add your answer:

Earn +20 pts
Q: What is the difference between normal variable and register variable in c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is difference between partial differentation and normal diffrentation?

Ordinary Diff -> One variable Partial Diff -> More than one variable


Explain the difference between market price and normal price?

difference between market price and normal price


What is the difference between pointer variable and simple variable What are the advantages of pointer variable?

normal variable stores a value of the given datatype where as the pointer variable stores the address of a variable. for example int n=10; int *p; p=&n; here p is a pointer variable and n is a normal variable.p stores the address of n where as n stores an integer value. *p prints the value of n,p prints the address of n.


Is there a difference between a wii motion plus controler and a normal controller?

Wii Motion Plus controllers register movements better and allow you to play more games.


What is the difference between member function and normal function?

What is the difference between malloc() and calloc()?


What is the difference between a micro pet and a normal pet?

the difference between a micro pet and a normal pet is that a micro pet is a really small animal such as a micro pig and a normal animal is a animal just like a normal person normal size normal wight and that is the difference between a normal animal and a micro animal.


What is the difference between a normal and a participating preference share?

what is defference between normal and preference shares


What is the difference between normal breathing and healthy breathing?

There's a difference?


What is the difference between normal saline solution and ringer's lactate solution?

What is the difference between normal saline solution and ringer's lactate solution?


What is the difference between a currency note and normal paper?

The difference between currency notes and normal paper is simple. Currency notes were used when normal paper money was not available.


What is the probability that a standard normal variable will be between the values of -2 and 1?

0.636 approx.


What is the difference between normal and average respiratory rate?

The difference between normal and average respiratory rate is simple. Normal is healthy and cannot change and average most certainly can change.

People also asked