Declarations Flow table DFT in C++ Programming
Declarations Flow table DFT is used to represent the full life cycle of variables and arrays (and, similar things)and elaborate the life cycle with line numbers of the program containing declarations, initializations, and use.
What is the Declaration (Line Number)?
Mention the line number where the given variable or array is declared in the program.
What is Initialization (Line Number)?
Mention the line number where the given variable or array is initialized in the program.
What is Use(Line Number)?
Mention all the line numbers where the given variable or array is used (excluding declaration and initialization)in the program.
using namespace std;
int numbers, sum = 0;
cout << "Enter 10 numbers: ";
// cout statement to ask user to enter 10 numbers in an array
// cin 10 numbers with for loop
for (int i = 0; i < 10; ++i)
cin >> numbers[i];
sum += numbers[i];
cout << "Sum = " << sum << endl;
Declarations Flow table (DFT)
|Variable and array||Declaration
|sum||5||5 | 12||14|
|i||9A||9A | 9C||11 | 12 ||9B|
Buy advertisement space on T4Tutorials
For more details email [email protected]