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. |
This is a brief reference of available C constructs.
Contenido |
[editar] Los temas generales
[editar] Preprocessor
[editar] Comentarios
[editar] Palabras clave
[editar] Tabla ASCII
[editar] Las secuencias de escape
[editar] Historia de C
[editar] Control de flujo
[editar] Sentencias condicionales ejecución
Different code paths are executed according to the value of given expression
- if ejecuta el código de forma condicionalOriginal: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 ejecuta el código de acuerdo con el valor de un 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.
[editar] Instrucciones de iteración
The same code is executed several times
- for executes loop
- while ejecuta bucle, comprobando condición antes de cada iteraciónOriginal: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. - ejecuta bucle, comprobando condición después de cada iteraciónOriginal:do-while</div> executes 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.
[editar] Ir declaraciones
Continue execution at a different location
- continue se salta la parte restante del cuerpo del bucle envolventeOriginal: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 el bucle envolventeOriginal: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 que continúa la ejecución en otra ubicaciónOriginal: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 la ejecución de la función envolventeOriginal: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.
[editar] Funciones
The same code can be reused at different locations in the program
- <div class="t-tr-text"> declaración de la función</div> declares 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. - <div class="t-tr-text"> especificador inline</div> hints 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.
[editar] Tipos
- <div class="t-tr-text"> tipos fundamentales</div> defines 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. - <div class="t-tr-text"> tipos de puntero</div>, 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. - <div class="t-tr-text"> tipos de compuestos</div> defines 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. - <div class="t-tr-text"> los tipos de enumeración</div> defines 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. - <div class="t-tr-text"> tipos de unión</div> defines 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. - definir firmas de función de llamada, es decir, los tipos de argumentos y el tipo de cambioOriginal:tipos de funciones</div> define 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.
[editar] Los especificadores
- <div class="t-tr-text"> cv especificadores</div> specifies 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. - <div class="t-tr-text"> especificadores de clase de almacenamiento</div> specifies 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. - especifica que el almacenamiento para la variable debe estar alineado por (desde C99) cantidad específicaOriginal:alignas especificador</div> specifies 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.
[editar] Los literales
Literals are the tokens of a C program that represent constant values, embedded in the source code.
- son decimales, octales o hexadecimales de tipo entero .Original:literales enteros</div> are 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. - <div class="t-tr-text">Los literales de caracteres</div> are individual characters of type char, char16_t, char32_t, or wchar_t.Original: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. - son valores de tipo float, double o long doubleOriginal:Los literales de punto flotante</div> are values of type float, double, or long doubleOriginal: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.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - <div class="t-tr-text">literales de cadena</div> are 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. - <div class="t-tr-text">Los literales booleanos</div> are values of type bool, that is true and false (desde C99)Original: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. - son valores constantes de la especificada por el usuario (desde C99) tipoOriginal:definido por el usuario literales</div> are 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.
[editar] Expresiones
You can help to correct and verify the translation. Click here for instructions.
- <div class="t-tr-text">orden de evaluación</div> of 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 el uso de la sintaxis se encuentran comúnmente en las matemáticasOriginal: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 | ||||||
|---|---|---|---|---|---|---|
| asignación | incrementNJdecrement | aritmética | lógico | comparación | memberNJaccess | otro |
|
a = b |
++a |
+a |
!a |
a == b |
a[b] |
a(...) |
- <div class="t-tr-text"> prioridad de los operadores</div> the 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. - <div class="t-tr-text"> representaciones alternativas</div> alternative 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.
[editar] Utilidades
You can help to correct and verify the translation. Click here for instructions.
- <div class="t-tr-text"> declaración typedef</div> creates 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. - <div class="t-tr-text"> atributos</div> defines 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.
- conversiones implícitas de un tipo a otroOriginal:conversiones estándar</div> implicit 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.