logo

Crowdly

#define main1 main /** Question C1 What is output of the program? */ #incl...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

#define main1 main

/** Question C1

What is output of the program?

*/

#include <iostream>

int main1(int argc, char** argv){

   int a = 9;

   int b = 6;

   auto f = [a, b](int x) mutable {

      a += x;

      b += a;

      return 3*a + -3*b;

   };

   std::cout << f(2) << "|" << f(2) << "|" << a << "|" << b;

   return 0;

}

More questions like this

Want instant access to all verified answers on emokymai.vu.lt?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!