User Tools

Site Tools


cs509:cplusplusscope

See the following code:

#include <iostream>
using namespace std;

const double MYCONSTANT = 3.1416;

int main ()
{
   const double MYCONSTANT = 3.14159;
   
   cout << MYCONSTANT;
   
   return 0;
}

What is going to be output by the above program?

<poll What is going to be output by the above program? [1]>

  • 3.1416
  • 3.14159
  • Nothing since there's an error.

</poll>


cs509/cplusplusscope.txt · Last modified: 2013/02/13 18:45 by jchung

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki