Q:

What are the initial values, if any, of each of the following variables

0

What are the initial values, if any, of each of the following variables?

std::string global_str;
int global_int;
int main()
{
int local_int;
std::string local_str;
}

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

#include <string>

std::string global_str;  // Empty string object
int global_int;  // 0
int main() {
  int local_int;  // Undefined value
  std::string local_str;  // Empty string object

  return 0;
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now