Buscar

Considere a função abaixo: void func (int a, int &b) { a++; b = a*2; } e o seguinte trecho de código na função main : int x=2, y=3; func (x,y); fun...

Considere a função abaixo: void func (int a, int &b) { a++; b = a*2; } e o seguinte trecho de código na função main : int x=2, y=3; func (x,y); func (y,x); cout << x << " ; " << y; Após a execução do cout o que será impresso ?

a) 6; 14
b) 14; 6
c) 2; 6
d) 4; 12
e) 2; 12

Essa pergunta também está no material:

ESTRUTURA DE DADOS   exercícios   aula 02 (2)
7 pág.

Estrutura de Dados I Universidade Estácio de SáUniversidade Estácio de Sá

💡 1 Resposta

User badge image

Ed Verified user icon

Analisando o trecho de código fornecido, após a execução do cout, será impresso "14; 6". Portanto, a alternativa correta é: b) 14; 6

0
Dislike0

✏️ Responder

SetasNegritoItálicoSublinhadoTachadoCitaçãoCódigoLista numeradaLista com marcadoresSubscritoSobrescritoDiminuir recuoAumentar recuoCor da fonteCor de fundoAlinhamentoLimparInserir linkImagemFórmula

Para escrever sua resposta aqui, entre ou crie uma conta

User badge image

Outros materiais