Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
15Activity
0 of .
Results for:
No results containing your search query
P. 1
2297_C ou C++

2297_C ou C++

Ratings:

4.0

(2)
|Views: 428 |Likes:
Published by api-3800615
Apostila de C e C++
Apostila de C e C++

More info:

Published by: api-3800615 on Oct 17, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

05/09/2014

pdf

text

original

Faculdade de Ci\u00eancias Aplicadas de Cascavel \u2013 FACIAP
Curso de Ci\u00eancia da Computa\u00e7\u00e3o
LINGUAGEM C/C++
CASCAVEL - PR
2004
SUM\u00c1RIO
UNIDADE 1 \u2013 CONSIDERA\u00c7\u00d5ES INICIAIS SOBRE A LINGUAGEM C_______________1

1.1 AS ORIGENS DO C/C++_________________________________________________1 1.2 COMPILADORES E INTERPRETADORES___________________________________2 1.3 WARNINGS E ERROS___________________________________________________3 1.4 A LINGUAGEM C/C++ \u00c9 CASE-SENSITIVE__________________________________3 1.5 FUN\u00c7\u00d5ES EM C________________________________________________________3 1.5.1 FUN\u00c7\u00d5ES COM ARGUMENTOS_________________________________________4 1.5.2 FUN\u00c7\u00d5ES QUE RETORNAM VALORES___________________________________5 1.5.3 A FORMA GERAL DE UMA FUN\u00c7\u00c3O______________________________________6 1.6 PALAVRAS RESERVADAS DA LINGUAGEM C_______________________________6

UNIDADE 2 \u2013 TIPOS DE DADOS, CONSTANTES, OPERADORES E EXPRESS\u00d5ES____7

2.1 NOMES DE IDENTIFICADORES___________________________________________7 2.2 TIPOS DE DADOS______________________________________________________7 2.2.1 MODIFICADORES DE TIPOS____________________________________________8 2.3 DEFINI\u00c7\u00c3O DE VARI\u00c1VEIS_______________________________________________9 2.4 DEFINI\u00c7\u00c3O DE CONSTANTES____________________________________________9 2.4.1 CONSTANTES HEXADECIMAIS E OCTAIS________________________________10 2.4.2 CONSTANTES STRING_______________________________________________11 2.4.3 C\u00d3DIGOS DE BARRA INVERTIDA_______________________________________11 2.5 OPERADORES________________________________________________________11 2.5.1 OPERADOR DE ATRIBUI\u00c7\u00c3O__________________________________________12 2.5.2 OPERADORES ARITM\u00c9TICOS__________________________________________12 2.5.3 OPERADORES RELACIONAIS__________________________________________12 2.5.4 OPERADORES L\u00d3GICOS______________________________________________12 2.5.5 MANIPULA\u00c7\u00c3O DE BITS______________________________________________13 2.5.6 OPERADORES DE ASSINALAMENTO____________________________________13 2.5.7 OPERADORES DE PR\u00c9 E P\u00d3S-INCREMENTO____________________________14 2.5.8 OPERADORES DE ENDERE\u00c7O_________________________________________14 2.6 TABELA DE OPERADORES DO C________________________________________14 2.7 EXPRESS\u00d5ES________________________________________________________15 2.7.1 CONVERS\u00d5ES DE TIPOS EM EXPRESS\u00d5ES_____________________________15 2.7.2 MODELADORES (CASTS)_____________________________________________16 2.7.3 ESPA\u00c7AMENTO E PAR\u00caNTESES_______________________________________16 2.8 ESQUELETO DE UM PROGRAMA EM C___________________________________17

UNIDADE 3 \u2013 ESTRUTURAS B\u00c1SICAS DE PROGRAMA\u00c7\u00c3O (FLUXO DE CONTROLE)18

3.1 COMANDOS E BLOCOS________________________________________________18 3.2 PRINTF( )____________________________________________________________18 3.3 SCANF( )_____________________________________________________________20 3.4 A DECLARA\u00c7\u00c3O if_____________________________________________________23 3.4.1 USANDO A DECLARA\u00c7\u00c3O else_________________________________________24 3.4.2 O ENCADEAMENTO if-else-if___________________________________________25 3.4.3 A EXPRESS\u00c3O CONDICIONAL_________________________________________26 3.4.4 ifs ANINHADOS______________________________________________________27 3.5 A DECLARA\u00c7\u00c3O switch_________________________________________________28 3.5.1 A DECLARA\u00c7\u00c3O break________________________________________________29 3.5.2 DECLARA\u00c7\u00d5ES switch ANINHADAS_____________________________________30 3.6 LA\u00c7OS DE REPETI\u00c7\u00c3O_________________________________________________33 3.7 O LA\u00c7O for___________________________________________________________33 3.7.1 VARI\u00c1VEIS DO LA\u00c7O for______________________________________________35 3.7.2 O LA\u00c7O INFINITO____________________________________________________37

3.7.3 A INTERRUP\u00c7\u00c3O DE UM LA\u00c7O for______________________________________37 3.7.4 USANDO LA\u00c7OS for SEM CONTE\u00daDO___________________________________38 3.8 O LA\u00c7O while_________________________________________________________38 3.9 O LA\u00c7O do-while_______________________________________________________40 3.10 LA\u00c7OS ANINHADOS__________________________________________________41 3.11 QUEBRANDO UM LA\u00c7O_______________________________________________43 3.12 A DECLARA\u00c7\u00c3O CONTINUE____________________________________________44 3.13 R\u00d3TULOS E goto_____________________________________________________45

UNIDADE 4 \u2013 VETORES, MATRIZES E STRINGS_______________________________47

4.1 INTRODU\u00c7\u00c3O________________________________________________________47 4.2 DECLARA\u00c7\u00c3O DE VETORES UNIDIMENSIONAIS___________________________47 4.3 CADEIAS DE CARACTERES (STRINGS)___________________________________49 4.4 DECLARA\u00c7\u00c3O DE VETORES MULTIDIMENSIONAIS (MATRIZES)______________51 4.5 VETORES DE CADEIAS DE CARACTERES_________________________________52 4.6 INICIALIZA\u00c7\u00c3O DE VETORES___________________________________________53 4.7 LIMITES DE VETORES E SUA REPRESENTA\u00c7\u00c3O EM MEM\u00d3RIA_______________54

UNIDADE 5 \u2013 APONTADORES (PONTEIROS)__________________________________56

5.1 PONTEIROS S\u00c3O ENDERE\u00c7OS__________________________________________56 5.2 VARI\u00c1VEIS PONTEIRO_________________________________________________57 5.3 OS OPERADORES DE PONTEIROS_______________________________________57 5.4 IMPORT\u00c2NCIA DO TIPO BASE___________________________________________59 5.5 EXPRESS\u00d5ES COM PONTEIROS________________________________________59 5.5.1 ATRIBUI\u00c7\u00c3O DE PONTEIROS__________________________________________59 5.5.2 ARITM\u00c9TICA COM PONTEIROS________________________________________60 5.5.3 COMPARA\u00c7\u00c3O COM PONTEIROS______________________________________61 5.6 PONTEIROS E MATRIZES_______________________________________________61 5.6.1 INDEXANDO UM PONTEIRO___________________________________________63 5.6.2 PONTEIROS E STRINGS______________________________________________63 5.6.3 OBTENDO O ENDERE\u00c7O DE UM ELEMENTO DA MATRIZ___________________64 5.6.4 MATRIZES DE PONTEIROS____________________________________________64 5.6.5 PROGRAMA EXEMPLO: TRADUTOR INGL\u00caS-PORTUGU\u00caS_________________65 5.7 PONTEIROS PARA PONTEIROS_________________________________________69 5.8 INICIALIZANDO PONTEIROS____________________________________________70 5.9 PROBLEMAS COM PONTEIROS__________________________________________72

UNIDADE 6 \u2013 TIPOS DE DADOS DEFINIDOS PELO USU\u00c1RIO____________________74

6.1 ESTRUTURAS________________________________________________________74 6.1.1 REFERENCIANDO OS CAMPOS DA ESTRUTURA__________________________75 6.1.2 MATRIZES DE ESTRUTURAS__________________________________________75 6.1.3 ATRIBUINDO ESTRUTURAS___________________________________________76 6.1.4 PASSANDO ESTRUTURAS PARA FUN\u00c7\u00d5ES______________________________76 6.1.5 PONTEIROS PARA ESTRUTURAS______________________________________78 6.1.6 MATRIZES E ESTRUTURAS DENTRO DE ESTRUTURAS____________________81 6.2 UNI\u00d5ES______________________________________________________________82 6.3 ENUMERA\u00c7\u00d5ES______________________________________________________83 6.4 typedef_______________________________________________________________86

UNIDADE 7 \u2013 ESTUDO DETALHADO DE FUN\u00c7\u00d5ES____________________________87

7.1 FORMA GERAL DE UMA FUN\u00c7\u00c3O________________________________________87 7.2 A DECLARA\u00c7\u00c3O return_________________________________________________87 7.2.1 RETORNANDO DE UMA FUN\u00c7\u00c3O_______________________________________88 7.2.2 RETORNANDO UM VALOR____________________________________________88 7.3 FUN\u00c7\u00d5ES RETORNANDO VALORES N\u00c3O-INTEIROS________________________90 7.3.1 FUN\u00c7\u00d5ES QUE RETORNAM PONTEIROS________________________________92

Activity (15)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Michel liked this
Willy liked this
2010odonto liked this
estudantte liked this
Joao Jose Silva liked this
Valterrr liked this
louco2 liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->