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 = 2;

   int b = 8;

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

      a += x;

      b += a;

      return a + b;

   };

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

   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!