Search Header Logo

Duomenų struktūrų naudojimas

Authored by Elina Petrulienė

Information Technology (IT)

12th Grade

Used 1+ times

Duomenų struktūrų naudojimas
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Pasirinkite, kuri eilutė teisingai deklaruoja realiųjų skaičių masyvą C++ programavimo kalboje:

string A[i];

double A[100];

double [5];

int A[100];

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Ką programa atspausdins?

#include <iostream>

using namespace std;

int main() 

{

    int masyvas[5];

    for(int i = 0; i < 5; i++) {

        masyvas[i] = i + 1;

    }

    for(int i = 0; i < 5; i++) {

        cout << masyvas[i] << " ";

    }

}

1 2 3 4 5

5

0 1 2 3 4

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Ką programa atspausdins?

#include <iostream>

using namespace std;

int main ()

{

string vardas[5] = {"Austėja", "Arnė", "Augustas", "Augustė", "Adomas"};

string klase[5] = {"2a", "2b", "2c", "2a", "2b"};

for (int i=0; i<5; i++)

{

if (vardas[i] == "Arnė")

{

cout << klase[i] << " ";

}

}

}

2a

2b

2c

2a 2b 2c

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Ką programa spausdins, jei įvesime Labas

#include <iostream>

using namespace std;

int main()

{

string zodis;

int k = 0;

cin >> zodis;

for (int i=0; i<zodis.size(); i++)

{

if (zodis[i] >= 'a' && zodis[i] <= 'z') k++;

}

cout << k;

}

Labas

5

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. Ką programa spausdins, jei įvesime

6

4 6 8 10 12 14

#include <iostream>

using namespace std;

int funkcija(int n, int B[]);

int main()

{

int n;

int B[50];

cin >> n;

for (int i=0; i<n; i++)

{

cin >> B[i];

}

cout << funkcija(n, B);

}

int funkcija(int n, int B[])

{

int s=10, k=0;

for (int i=0; i<n; i++)

{

if (s < B[i]) k = k + B[i];

}

return k;

}

26

6

4 6 8 10 12 14

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?