¡GoConqr estrena diseño! Cuéntanos qué te parece.

Diagrama de flujo

Sin título

Jossy Ivan Mejia Vargas Español

Contenido del diagrama

  1. C

  2. C program consists of functions and variables.

    A function contains statements that specify the computing operations to be done, and variables store values used during the computation

  3. main will usually call other functions to help perform its job

  4. #include <stdio.h> tells the compiler to include information about the standard input/output library

  5. The sequence \n in the string is C notation for the newline character,

  6. You must use \n to include a newline character in the printf argument

  7. Variables and Arithmetic Expressions

  8. In C, all variables must be declared before they are used, usually at the beginning of the function before any executable statements. A declaration announces the properties of variables

  9. The type int means that the variables listed are integers; by contrast with float, which means floating point, i.e.,

  10. other data types

  11. char: character - a single byte

    short: short integer

    long: long integer

    double: double-precision floating point

  12. While

  13. The while loop operates as follows: The condition in parentheses is tested. If it is true the body of the loop is executed. Then the condition is re-tested, and if true, the body is executed again. When the test becomes false the loop ends

  14. scanf is like printf, except that it reads input instead of writing output.

  15. The for statement

  16. The for statement is a loop, a generalization of the while. If you compare it to the earlier while, its operation should be clear. Within the parentheses, there are three parts, separated by semicolons.

  17. This condition is evaluated; if it is true, the body of the loop is executed.

  18. Then the increment step is executed, and the condition re-evaluated. The loop terminates if the condition has become false.

  19. The choice between while and for is arbitrary

  20. Character Input and Output

  21. Character Counting, a new operator, ++, which means increment by one,nc = nc + 1 but ++nc is more concise and often more efficient

    operator -- to decrement by 1.

    ++ and -- can be either prefix operators (++nc) or postfix operators

  22. Line Counting

  23. if statement tests the parenthesized condition, and if the condition is true, executes the statement (or group of statements in braces) that follows.

  24. The double equals sign == is the C notation for ``is equal to''

  25. The conditions are evaluated in order from the top until some condition is satisfied.

    If none of the conditions is satisfied, the statement after the final else is executed if it is present. If the final else and statement are omitted, as in the word count program, no action takes place

  26. Functions

  27. A function provides a convenient way to encapsulate some computation

  28. no function can be split between files. If the source program appears in several files, you may have to say more to compile and load it than if it all appears in one, but that is an operating system matter, not a language attribute.

  29. A function need not return a value; a return statement with no expression causes control, but no useful value, to be returned to the caller, as does ``falling off the end'' of a function by reaching the terminating right brace.

  30. Arguments - Call by Value

  31. One aspect of C functions may be unfamiliar to programmers who are used to some other languages, One aspect of C functions may be unfamiliar to programmers who are used to some other languages,

  32. Variable Names

  33. there are some restrictions on the names of variables and symbolic constants. Names are made up of letters and digits; the first character must be a letter. The underscore ``_'' counts as a letter; it is sometimes useful for improving the readability of long variable names.

  34. Traditional C practice is to use lower case for variable names, and all upper case for symbolic constants.

  35. For external names, the standard guarantees uniqueness only for 6 characters and a single case. Keywords like if, else, int, float, etc., are reserved: you can't use them as variable names. They must be in lower case.

  36. Declarations

  37. The qualifier const can be applied to the declaration of any variable to specify that its value will not be changed. For an array, the const qualifier says that the elements will not be altered.

  38. The const declaration can also be used with array arguments, to indicate that the function does not change that array

  39. Arithmetic Operators

  40. The binary arithmetic operators are +, -, *, /,

  41. The % operator cannot be applied to a float or double.

  42. Relational and Logical Operators

  43. The relational operators are > >= < <=

  44. They all have the same precedence. Just below them in precedence are the equality operators: == !=

  45. Expressions connected by && or || are evaluated left to right, and evaluation stops as soon as the truth or falsehood of the result is known.

  46. Bitwise Operators

  47. C provides six operators for bit manipulation

  48. & bitwise AND

    | bitwise inclusive OR

    ^ bitwise exclusive OR

    << left shift

    >> right shift

    ~ one's complement (unary)

  49. TEC,Sede central, Fundamentos de organización de computadoras

    Resumen #8 (Libro C, caps. 1 y 2)

    Jossy Mejia Vargas

    Lunes 30 de octubre, 2 semestre, Esteban Arias Mendéz

Información

Descripción
Diagrama sobre Sin título, creado por Jossy Ivan Mejia Vargas el 31/10/2017.
Visitas
2
Valoración

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?