logo

Crowdly

Browser

Add to Chrome

Програмування (СА)

Looking for Програмування (СА) test answers and solutions? Browse our comprehensive collection of verified answers for Програмування (СА) at e-learning.lnu.edu.ua.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

Що буде виведено в результаті виконання коду?

Введіть відповідь точно так, як її виведе програма, без додаткових пробілів.

#include <iostream>

#include <set>

#include <map>

#include <string>

#include <functional>

using namespace std;

int main(){

multiset<int> ms={1,1,2}; cout<<ms.count(1);

return 0;

}

View this question

Що буде виведено в результаті виконання коду?

Введіть відповідь точно так, як її виведе програма, без додаткових пробілів.

#include <iostream>

#include <vector>

using namespace std;

int main(){

vector<int> v={5,6}; v.pop_back(); cout<<v.back();

return 0;

}

View this question

Що буде виведено в результаті виконання коду?

Введіть відповідь точно так, як її виведе програма, без додаткових пробілів.

#include <iostream>

#include <string>

using namespace std;

class Part{public:Part(){cout<<"P";} }; class Whole{Part p; public:Whole(){cout<<"W";} };

int main(){

Whole w;

return 0;

}

View this question

Що буде виведено в результаті виконання коду?

Введіть відповідь точно так, як її виведе програма, без додаткових пробілів.

#include <iostream>

#include <set>

#include <map>

#include <string>

#include <functional>

using namespace std;

int main(){

set<int> s={3,1,2}; for(int x:s) cout<<x;

return 0;

}

View this question

Що буде виведено в результаті виконання коду?

Введіть відповідь точно так, як її виведе програма, без додаткових пробілів.

#include <iostream>

#include <set>

#include <map>

#include <string>

#include <functional>

using namespace std;

int main(){

set<int> s={1,1,2}; cout<<s.size();

return 0;

}

View this question

Що буде виведено в результаті виконання коду?

Введіть відповідь точно так, як її виведе програма, без додаткових пробілів.

#include <iostream>

#include <vector>

#include <algorithm>

#include <queue>

#include <set>

#include <string>

#include <cmath>

using namespace std;

struct Square{int operator()(int x) const{return x*x;}};

int main(){

Square f; cout<<f(4);

return 0;

}

View this question

Що буде виведено в результаті виконання коду?

Введіть відповідь точно так, як її виведе програма, без додаткових пробілів.

#include <iostream>

using namespace std;

struct A {

void show(){cout<<"A";}

};

struct B : public A {

void show(){cout<<"B";}

};

int main() {

B obj;

obj.show();

return 0;

}

View this question

Який буде результат спроби скомпілювати цей код?

Введіть відповідь точно так, як зазначено у варіантах екзамену.

#include <iostream>

using namespace std;

class A {

private:

int x = 5;

};

int main() {

A obj;

cout << obj.x;

return 0;

}

View this question

Що буде виведено в результаті виконання коду?

Введіть відповідь точно так, як її виведе програма, без додаткових пробілів.

#include <iostream>

#include <vector>

#include <algorithm>

#include <numeric>

using namespace std;

int main(){

vector<int> v={3,1,2}; sort(v.begin(),v.end()); for(int x:v) cout<<x;

return 0;

}

View this question

Що буде виведено в результаті виконання коду?

Введіть відповідь точно так, як її виведе програма, без додаткових пробілів.

#include <iostream>

#include <string>

using namespace std;

class A{public:A(){cout<<"A";} ~A(){cout<<"a";} }; class B{A a; public:B(){cout<<"B";} ~B(){cout<<"b";} };

int main(){

B obj;

return 0;

}

View this question

Want instant access to all verified answers on e-learning.lnu.edu.ua?

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

Browser

Add to Chrome