Search Header Logo

Vetores C# Quiz

Authored by MÁRIO NASCIMENTO

Computers

University

Used 66+ times

Vetores C# Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

13 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual é a sintaxe correta para declarar um vetor de inteiros em C#?

`int[] vetor = new int[5];`

`int vetor = new int[5];`

`int vetor[] = new int[5];`

`int vetor = int[5];`

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Como você inicializa um vetor de inteiros com valores específicos em C#?

`int[] vetor = {1, 2, 3, 4, 5};`

`int vetor = {1, 2, 3, 4, 5};`

`int vetor[] = new int[] {1, 2, 3, 4, 5};`

`int[] vetor = new int[5] {1, 2, 3, 4, 5};`

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Como você acessa o terceiro elemento de um vetor chamado `numeros`?

`numeros[2]`

`numeros[3]`

`numeros(2)`

`numeros(3)`

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual é o valor padrão dos elementos de um vetor de inteiros em C#?

`1`

`0`

`null`

`-1`

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Como você inicializa um vetor de inteiros com os valores 1, 2 e 3?

`int[] vetor = {1, 2, 3};`

`int[] vetor = new int[3]{1, 2, 3};`

`int[] vetor = new int[]{1, 2, 3};`

Todas as opções acima

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual é o método usado para obter o comprimento de um vetor em C#?

`vetor.Length`

`vetor.Size`

`vetor.Count`

`vetor.GetLength()`

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Como você copia um vetor chamado `origem` para um vetor chamado `destino`?

`Array.Copy(origem, destino, origem.Length);`

`Array.Clone(origem, destino, origem.Length);`

`Array.CopyTo(origem, destino, origem.Length);`

`Array.Transfer(origem, destino, origem.Length);`

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?