What will be the result of a following code execution?
 
using System; 

class App 
{ 
     static void Main() 
     { 
        string s; 
        s+="string"; 
        Console.WriteLine(s); 
    } 
 }
 
Explanation
Variable s is not initialized. If code looked like this
 
string s = "";
s += "string"; 
Cnsole.WriteLine(s);
 
then everything would have been fine, because at least some value is assigned to variable s.

Слідкуй за CodeGalaxy

Мобільний додаток Beta

Get it on Google Play
Зворотній Зв’язок
Cosmo
Зареєструйся Зараз
або Підпишись на майбутні тести