1. Home >
  2. Apps >
  3. Groups >

temporary variable

Question asked by Surya.Cse in #Coffee Room on Nov 6, 2015
Surya.Cse
Surya.Cse · Nov 6, 2015
Rank E1 - BEGINNER
why we use temporary variable in programs?? Posted in: #Coffee Room
Subathra Prem kumar
Subathra Prem kumar · Nov 6, 2015
Rank D3 - MASTER
Surya.Cse
why we use temporary variable in programs??
Temporary variables let you store and reuse the value of expressions. They can be used to improve the performance or readability of methods.
Eg: if you take a swap function,

Int temp, a,b;
Temp =a;
A=b;
B=temp ;

In this case temp variable store the value of variable A and assign it to another variable B.
In a=b; ------- we assign the b value in a.
Hope this is helpful
Surya.Cse
Surya.Cse · Nov 6, 2015
Rank E1 - BEGINNER
thank u fo gvng proper ans......!!!...hv a nice day
Vishal Sharma
Vishal Sharma · Nov 8, 2015
Rank B3 - LEADER
Surya.Cse
thank u fo gvng proper ans......!!!...hv a nice day
Stop using "SMS language"

You must log-in or sign-up to reply to this post.

Click to Log-In or Sign-Up