INPUT OUTPUT

Cards (20)

  • Output the side effect of the program that gives data back to the user. In this case the printf() is used as the output function
  • Return statement and value this indicates the end of your function. It can return a value you are expecting it to process or in this case, return the exit status of the main function
  • return this function is used to exit a function and return a value in non void type functions. Return 0; is usually an indication of a successful execution of a program.
  • Comments Are text in a source code that is specifically included for human explanation and human understanding and is indicated so that it will be ignored by the compiler
  • The ( # ) hash is the operator used to indicate preprocessing directives in the program.
  • The () open and close parenthesis is also used as the indicator of a function, representing the arguments or parameter list that it has
  • The {} open and close curly braces are used to indicate a block of code under a function, a compound statement or the values of an array
  • The <> open and close angular brackets are used to indicate libraries
  • The ; semicolon is the symbol used to indicate the end of a statement.
  • The , comma is the operator used to separate values, variables, arguments, parameters and so on in a single statement
  • The ( // ) double forward slash or (/* */) or the closed-open pair of forward slash and asterisk(just what I call them) is used to indicate comments in C
  • The (“”) double quotes and (‘’) single quotes are used to indicate string and character literals respectively
  • C compiler preprocessor These are processes that are processed before the compilation and execution of the code. Though it can be placed anywhere as they are preprocessed, it is good design to place them as the head of your file
  • #include or otherwise known as macro include, is a macro processing directive that lets you ‘include’ a copy of a file or library of code into your own.
  • # define - this preprocessing directive lets you “define” constant variables before the compilation
  • printf() - this is a function used for output.
  • scanf() - this is a function used for input.
  • getche() reads a character with echo or in other words, outputting the input to the console
    or screen. It does not wait for carriage return or ENTER key.
    getch() reads a character without echo. It does not wait for carriage return or ENTER key.
    getchar() reads a single individual character from the keyboard and waits for the carriage
    return or ENTER key.
  • puts() writes a string to the screen, followed by a newline. It can only output a string of
    characters. It cannot output numbers or do format conversion. It takes up less space and
    run faster.
    putchar() writes a string (character) to the screen.
  • Conversion specification these specifications let the function know how to interpret a variable inside the function.