Answered step by step
Verified Expert Solution
Question
1 Approved Answer
What is the output of the following code? struct someType { int a; int b; }; void f1(someType &s) { s.a = 1; s.b =
What is the output of the following code? struct someType { int a; int b; }; void f1(someType &s) { s.a = 1; s.b = 2; } someType f2(someType s) { someType t; t = s; s.a = 3; return t; } int main() { someType s1, s2; f1(s1); s2 = f2(s1); cout << s1.a << '-' << s1.b << '-' << s2.a << '-' << s2.b << '-' << endl; return 0; }
What should be placed in the blank to finish the code?
// Use structures declared above employeeType employees[10]; for (int i = 0; i < 10; i++) { cin >> ___________; }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started