C language
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
<metanoindex/>
This is a brief reference of available C constructs.
Tópicos gerais
Preprocessor
Comentários
Palavras-chave
Tabela ASCII
Seqüências de escape
História da C
Controle de fluxo
Declarações execução condicional
Different code paths are executed according to the value of given expression
- if executa código condicionalmenteOriginal:if executes code conditionallyThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - switch executa o código de acordo com o valor de um argumento integralOriginal:switch executes code according to the value of an integral argumentThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Instruções de iteração
The same code is executed several times
- for executes loop
- while executa loop, verificando condições antes de cada iteraçãoOriginal:while executes loop, checking condition before each iterationThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - fazer enquantoexecuta loop, verificando condição após cada iteraçãoOriginal:do-whileThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.Original:fazer enquantoexecutes loop, checking condition after each iterationOriginal:do-whileThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Ir declarações
Continue execution at a different location
- continue pula a parte restante do corpo do ciclo de fechamentoOriginal:continue skips the remaining part of the enclosing loop bodyThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - break termina o loop de fechamentoOriginal:break terminates the enclosing loopThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - goto continua a execução em outro localOriginal:goto continues execution in another locationThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - return termina a execução da função de fechamentoOriginal:return terminates execution of the enclosing functionThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Funções
The same code can be reused at different locations in the program
- declaração da funçãodeclares a functionOriginal:function declarationThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions. - linha especificadorhints the compiler to insert a function's body directly into the calling codeOriginal:inline specifierThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
Tipos
- tipos fundamentaisdefines basic character, integer and floating point typesOriginal:fundamental typesThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions. - tipos de ponteiro, holding a memory locationOriginal:pointer typesThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions. - tipos de compostosdefines types, holding several data members (essentially the same as class)Original:compound typesThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions. - tipos de enumeraçãodefines types, that are able to hold only one of the specified valuesOriginal:enumeration typesThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions. - tipos de uniãodefines types, that can hold data in several representationsOriginal:union typesThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions. - tipos de funçãodefinir assinaturas de chamadas de função, isto é, os tipos de argumentos eo tipo de retornoOriginal:function typesThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.Original:tipos de funçãodefine function call signatures, that is the types of arguments and the return typeOriginal:function typesThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Especificadores
- cv especificadoresspecifies constness and volatility of a typeOriginal:cv specifiersThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions. - armazenamento de classe especificadoresspecifies storage duration and linkage of a typeOriginal:storage-class specifiersThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions. - alignas especificadorespecifica que o armazenamento para a variável deve ser harmonizado, (desde C99) quantidade específicaOriginal:alignas specifierThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.Original:alignas especificadorspecifies that the storage for the variable should be aligned by specific amount (desde C99)Original:alignas specifierThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Literais
Literals are the tokens of a C program that represent constant values, embedded in the source code.
- literais inteirosão decimal, octal, ou números hexadecimais do tipo inteiro.Original:integer literalsThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.Original:literais inteiroare decimal, octal, or hexadecimal numbers of integer type.Original:integer literalsThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - literais de caracteresare individual characters of typeOriginal:character literalsThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.char,char16_t,char32_t, orwchar_t. - literais de ponto flutuantesão valores do tipoOriginal:floating-point literalsThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.float,double,long doubleouOriginal:literais de ponto flutuanteare values of typeOriginal:floating-point literalsThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.float,double, orlong doubleThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - literais de cadeiaare sequences of characters, which may be narrow, multibyte, or wide.Original:string literalsThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions. - literais booleanosare values of typeOriginal:boolean literalsThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.bool, that istrueandfalse(desde C99) - definido pelo usuário literaissão valores constantes do especificado pelo usuário (desde C99) tipoOriginal:user-defined literalsThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.Original:definido pelo usuário literaisare constant values of user-specified type (desde C99)Original:user-defined literalsThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Expressões
You can help to correct and verify the translation. Click here for instructions.
- ordem de avaliaçãoof arguments and subexpressions specified the order in which intermediate results are obtained.Original:order of evaluationThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions. - operators permitir o uso de sintaxe comumente encontrados em matemáticaOriginal:operators allow the use of syntax commonly found in mathematicsThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
| Common operators | ||||||
|---|---|---|---|---|---|---|
| atribuição | incrementNJdecrement | aritmética | lógico | comparação | memberNJaccess | outro |
|
|
|
|
|
|
|
|
- precedência do operadorthe order in which operators are bound to their argumentsOriginal:operator precedenceThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions. - representações alternativasalternative spellings for some of the operatorsOriginal:alternative representationsThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
Utilitários
You can help to correct and verify the translation. Click here for instructions.
- declaração typedefcreates a synonym for a typeOriginal:typedef declarationThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions. - atributosdefines additional information about variable (desde C99)Original:attributesThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
You can help to correct and verify the translation. Click here for instructions.
- conversões standardconversões implícitas de um tipo para outroOriginal:standard conversionsThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.Original:conversões standardimplicit conversions from one type to anotherOriginal:standard conversionsThe text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.