archive-edu.com » EDU » V » VCSU.EDU

Total: 315

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • Executable and non-executable statements (VCSU-MEP)
    language of the executables Non executables are usually declarative That is they indicate the properties or presence of things that will be later used by the executables For example include statements are not executable They make available libraries of executables but do not cause any execution directly The function header int main does not cause any execution but describes the properties of the main function Executable statements cause an action

    Original URL path: http://euler.vcsu.edu:7000/694/ (2013-06-12)
    Open archived version from archive


  • Comments in Programs (VCSU-MEP)
    make the program more readable to people The simple fact is that programs tend to last a long time sometimes several decades Comments make programs easier to understand and maintain Comments are used for several purposes identify the author purpose creation date etc of a program Comments should be used to describe any aspect of the program that is not obvious C has two styles of comments one inherited from

    Original URL path: http://euler.vcsu.edu:7000/691/ (2013-06-12)
    Open archived version from archive

  • Statements (VCSU-MEP)
    discussed here C is an expression language What this means is that any expression can be a statement Further significance of this will be discussed with the assignment statement Statements are terminated by semicolons that is each statement is concluded by a semicolon Two important statements are discussed in the following exhibits a Output can be accomplished using the predefined variable cout b The return statement ends a function or

    Original URL path: http://euler.vcsu.edu:7000/902/ (2013-06-12)
    Open archived version from archive

  • Program and function headers (VCSU-MEP)
    BODY Each of these is discussed in separate exhibits indicated by the menu letters The example from the earlier program is int main the header of main the body follows cout return 0 where a the TYPE is int integer b the FN NAME is main which is the name of the function c the PARMS is empty that is none are present in this example d the BODY is

    Original URL path: http://euler.vcsu.edu:7000/1021/ (2013-06-12)
    Open archived version from archive

  • Form of a C++ program (VCSU-MEP)
    at the beginning are a nice touch to introduce things Next will be some includes Include statements make libraries available to the program Every C program needs one or more libraries Simple programs will next have the definition of the main function The main function like any function consists of a header followed by a compound statement A compound statement is just an opening brace followed by several statements and

    Original URL path: http://euler.vcsu.edu:7000/868/ (2013-06-12)
    Open archived version from archive

  • Why do we need variables? (VCSU-MEP)
    the constant PI and the radius Without variables we must 1 edit the program to change the constant that represents the radius 2 compile the new program and 3 run the program The better way is to write a similar program that will ask the user for the value of the radius then compute the area and write it out to the screen The first program computes the area for

    Original URL path: http://euler.vcsu.edu:7000/1178/ (2013-06-12)
    Open archived version from archive

  • Variable Declaration (VCSU-MEP)
    a statement and the generalized form of the statement is TYPE NAME where TYPE is the type of the variable and NAME is the name of the variable For example int an integer declares a variable by the name of an integer and sets its type to that of int which is an integer valued type There are more options as well that can be seen in the next exhibit

    Original URL path: http://euler.vcsu.edu:7000/718/ (2013-06-12)
    Open archived version from archive

  • The Assignment Statement (VCSU-MEP)
    is the name of any previously declared variable and EXPR is an expression An expression is as simple as a variable or constant and as complicated as you want to make it An expression may include variables constants operators and function calls The action of the assignment statement is as follows the expression is computed resulting in one value that value replaces the current value that VAR holds That value

    Original URL path: http://euler.vcsu.edu:7000/719/ (2013-06-12)
    Open archived version from archive



  •