What happens when you attempt to compile and run the following code?
#include
using namespace std;
int x=5;
static int y=0;
void myFunction(int a)
{
y=++a;
}
int main (int argc, const char * argv[])
{
int i=0;
myFunction(i);
cout< }
Suggested Answer: C
Get Premium CPA-21-02 Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
1 comments · newest first
DY
Dyan
5 days ago
I think the static variable `y` starts at 0, so it might print 0 for that.