What will be the result of the following function call?
#include <iostream>
#include <string>

using namespace std;

const string &foo(const string &s)
{
  return s;
}

int main()
{
  const string &res = foo("abc");  // 1

  cout << res << endl;

  return 0;
}

Слідкуй за CodeGalaxy

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

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