how to swap two strings without third variable
  • Hi in interview today i hear new question that how to swap two strings without using temp variable.any idea
  • 4 Comments sorted by
  • What is this y question has revised
  • oh thx Mr.Asif i saw now.
  • In C#, C Sharp

    string str1 = "First";
    string str2 = "Second";
    str1 = string.Concat(str1, str2);
    str2 = str1.Replace(str2,"");
    str1 = str1.Replace(str2,"");

Howdy, Stranger!

It looks like you're new here. If you want to get involved, or you want to Ask a new Question, Please Login or Create a new Account by Clicking below

Login with Facebook


Popular Posts of the Week