Monday, March 18, 2019
C++ Programming :: science
C++ Programming NOTES ON C++ PROGRAMMING Module 1 Pointers and holding Management NOTES ON C++ PROGRAMMING Module 1 Pointers and repositing Management TABLE OF CONTENTS TABLE OF CONTENTS 1 OVERVIEW 4 BASIC computer storage MANAGEMENT 5 GROUP ASSIGNMENT 6 INITIALIZATION 8 CONSTANTS 9 INCREMENT AND DECREMENT OPERATORS 10 ELSE-IF 13 SWITCH 14 LOOPS 15 EXAMPLES OF LOOPS 16 BREAK, CONTINUE 18 ingathering 19 FUNCTION DEFINITION 21 VOID FUNCTIONS 22 FUNCTIONS returning(a) A VALUE 23 OVERVIEW Algorithms A step-by-step sequence of book of instructions that describes how to perform a computation. Answers the question What method will you use to drub this computational problem? Flowcharrts Provides a pictorial representation of the algorithm victimization the symbols. Structure Charts Provides a pictorial representation of the modules contained in the program. Programming agency Standard form Function names starts in column 1 and is position with the required parentheses on a rail road line by itself. The enterprisingness brace of the function body follows on the next line and is set(p) under the first letter of the function name. The closing brace is placed by itself in column 1 as the last line of the function. The final form of your programs should be consistent and should always serve as an aid to the reading and understanding of your programs. Comments Explanatory remarks made within a program. Help clarify what the complete program is about, what a specific chemical group of statements is meant to accomplish, or what one line is intended to do. Top-Down Program exploitation 1. Determine the craved output items that the program must produce. 2. Determine the insert items 3. Design the program as follows a. Select an algorithm for transforming the input items into the desired outputs. b. Check the chosen algorithm, by hand, using specific input values. 4. principle the algorithm into C. 5. Test the program using selected test data. BASIC MEMORY MANAG EMENT Space set aside for the variable Characters 1 byte (8 bits) Pointers 4 bytes Integers 2 bytes (16 bits) or 4 bytes (32 bits) Short int or short 2 bytes Unsigned int or unsigned 2 bytes Long Integers 4 bytes Floats 4 bytes(single precision, about 7 decimal places) Doubles 8 bytes(double precision, about 15 decimal places) Type Space a) double *values __________________ ________________________ b) long x1000 __________________ ________________________ c) char *s = string __________________ ________________________ d) char s = string __________________ ________________________ e) char *name 10 __________________ ________________________
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment