Embedded C/C++ Specialized Test Questions
1. In linux+gcc, which of the following statements about the code is incorrect?____. std::string& test_str() { std::string str=”test”; return str; } int main() { std::string& str_ref=test_str(); std::cout<<str_ref<<std::endl;< p=”” style=”margin-right: auto; margin-left: auto;”></str_ref<<std::endl;<> return 0; } A Compilation warning B Returns a reference to a local variable, runtime unknown error C Compiles and runs normally D … Read more