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

   auto mix = [=](auto x, auto y){

      return x * a + y * b;

   };

   auto wrap = [&](int z){

      return mix(z, 2) - mix(5, z - 1);

   };

   std::cout << wrap(2 + 5);

   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!