Please confirm which of the two codes are efficient a or b . Where string is defines inside loop or outside loop.Kindly sugggest.
a)

for(int i=0;i