Send Close Add comments: (status displays here)
Got it!  This site uses cookies. You consent to this by clicking on "Got it!" or by continuing to use this website.nbsp; Note: This appears on each machine/browser from which this site is accessed.
Code and data driven programming


1. Code and data driven programming

2. Code driven programming
Code-drive programming involving control flow uses program code to achieve an effect.

3. Data driven programming
Data-driven programming (sometimes involving data flow) uses data to help achieve an effect.

4. Example in C
Here is an example of using an array of characters and indexing into the array to output the character at that position. The example program inputs an integer from 0 to 6 and outputs the three letter abbreviation for that day of the week.

5. Code driven approach



6. Data driven approach


Here is the C code.


7. Examples of input and output
Here are some examples of input and output for the above program code.

Here is an example input.

For the above example input, here is the expected output.

Here is an example input.

For the above example input, here is the expected output.

Here is an example input.

For the above example input, here is the expected output.


8. End of page

9. Multiple choice questions for this page