14.03.2015 Views

Apostila C da UFMG - Universidade do Minho

Apostila C da UFMG - Universidade do Minho

Apostila C da UFMG - Universidade do Minho

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3.9 - Auto-avaliação on-line: aula 3<br />

Respon<strong>da</strong> as perguntas abaixo, escolhen<strong>do</strong> a alternativa adequa<strong>da</strong> para ca<strong>da</strong> questão. Você pode atingir até a nota 100.<br />

Sen<strong>do</strong> que ca<strong>da</strong> questão certa vale 8,3 pontos.<br />

1- Escolha a opção que inclui somente nomes váli<strong>do</strong>s para variáveis na linguagem C.<br />

a. If, a_b_2, H789, _yes<br />

b. i, j, int, obs<br />

c. 9xy, a36, x*y, --j<br />

d. 2_ou_1, \fim, *h, j<br />

e. Nenhuma <strong>da</strong>s opções anteriores<br />

2- Qual <strong>da</strong>s instruções abaixo está erra<strong>da</strong>?<br />

a. int i;<br />

b. long float x;<br />

c. long <strong>do</strong>uble y;<br />

d. long ijk;<br />

e. short int a;<br />

f. unsigned b;<br />

3- Em um compila<strong>do</strong>r para um hardware de 16 bits uma variável <strong>do</strong>uble ocupa o mesmo espaço que _____ variáveis<br />

<strong>do</strong> tipo char<br />

a. Uma<br />

b. Duas<br />

c. Quatro<br />

d. Oito<br />

e. Dezesseis<br />

4- Qual o trecho de programa que inicializa a variável z?<br />

a. float z , z1=10.;<br />

b. float z; z = 10;<br />

c. float z = 10;<br />

d. z = 10;<br />

5- O trecho de programa a seguir é<br />

main()<br />

{<br />

char condicao;<br />

condicao = 'D';<br />

int i = 1;<br />

}<br />

a. Váli<strong>do</strong> na linguagem C<br />

b. Não váli<strong>do</strong> na linguagem C<br />

6- 0101 é uma constante __________ na linguagem C.<br />

a. Binária<br />

b. Hexadecimal<br />

c. Inteira<br />

d. Octal<br />

Pág. 22

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!