What is difference between value and reference types ?
Answer Posted / thirupathi reddy
value refers what is present in the address of the memory
Reference type refers to the address of the memory
Ex:
int a = 10( here the value stores in the address 'a' and the value of that address is 10)
int b = &a (here the variable b refers the address of
the variable a)
here if we print("%d",a) the value prints
here if we print("%d",b) the reference value of a is printed.
this is the difference between "value" and "reference values"
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
Why main is static in c#?
What are c# i/o classes?
Explain the differences between static, void and public in c#?
What is the difference between Object and class adapters?
How would you describe encapsulation in c#?
What are the advantages of constructor?
Why we use dll in c#?
What is wpf application in c#?
What is managed or unmanaged code?
How do you achieve polymorphism in c#?
What are Types of assemblies that can be created in dotnet
What is the default value of string in c#?
What are the features of c#?
Give an example of a directcast.
List some Advantages of switch-case over if else?