What is wrong with this call statement? PrintName(string name); It is missing vo
ID: 3822182 • Letter: W
Question
What is wrong with this call statement? PrintName(string name); It is missing void. The data type should be removed. The semicolon should be removed. Nothing is wrong with it. A variable's visibility indicating where in the program the variable can be used is called____. lifetime scope local variable global variable Explain how to declare and assign values to a two-dimensional array, and provide a C++ program segment that illustrates your answer. Provide a summary of how the values are stored. Create a writeData method snippet of code using NAME and State as variables. Collect the information and write it to file. C++ paragraph comments are represented by which characters?;;/**/>>//Explanation / Answer
15. The data type should be removed
In call statement we dont need to write the data type we will directly call with the variable name.
---> Variables visibility indicating in the program variable can be used is called scope.
Visibility modifiers tells the scope of the variables.
5. It is same as one dimensional array only but the difference is here we have two subscripts for rows and columns. The below is the snippet to declare and initialise 2 dimensional array with values
int main()
{
int a[2][3] = { {10,20,30} {40,50,60}};
}
In this 2 is for rows and 3 is for columns.
7.
int writeData()
{
string name,state;
ofstream datafile;
datafile.open("textfile.txt");
datafile << "writing name textfile"<<name;
datafile <<" writing State to file " << state;
datafile.close();
}
The above is the writedata method with the variables name and state. The snippet would get write into the file the name and state.
13. /*......*/ is the characters which used to comment the paragraph.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.