The output from the following code is
"function".
(The code will compile and run. )
#include <iostream>
using namespace std;
namespace
{
char c_string[ 10 ] = "namespace";
}
void output()
{
char c_string[ 10 ] = "function";
cout << c_string << endl;// which c_string?
//other code
}
int main()
{
output();
}
Correct Answer:
Verified
Q20: An unnamed namespace provides a facility for
Q21: The following program has been partitioned into
Q22: Here is some code.There are only two
Q23: The following program has been partitioned into
Q24: Carefully distinguish the using directive
using namespace std;
from
Q26: Given the namespace groupings that contain
Q27: You can declare several names from a
Q28: What is the problem that the C++
Q29: You want to use only one name,funct1,from
Q30: Consider the iostream library,in particular,cout and endl.Assume
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents