|
TOPIC: Key Concepts |
| Concept:1. | Introduction to C Programming
| Topic | Reference Type | Reference Link |
| Simple main program |
Example |
circle.c |
| User-defined Identifiers |
What is a user-defined identifier?
Answer:
When we are naming variables and function and choosing our own names we are using user-defined identifiers. Sample variables that we have user are i, j, k, ch, str, ret and some function names that we have created include len, is_bool, bin2hex. Here are the rules for creating identifiers:
- Identifiers may contain only letters, numbers, and underscores.
Commonly an identifier in all UPPERCASE letters will indicate a preprocessor identifier, such as PI, or a variables whose value does not change.
- An identifier can not begin with a digit (0-9).
- C has many reserved words that can not be identifiers, such as if, int, double, return.
- An identifier such as scanf, printf or other identifiers defined in the C standard library should not be redefined; they could be, but it is not good programming practice.
- As a guideline, keep identifier names shorter that 32 letters; some compilers may allow longer identifier names, others compilers may only use the first 31 letters for identifying unique identifiers which may lead to undesired consequences,
|
| Using comments |
Example |
circle.c |
| Calculating the area of a circle |
Example | circle.c |
| Cloud9 |
Introduction |
Lab-1.pdf |
| Integrated Development Environment (IDE) |
Example |
Lab-1.pdf |
| Tracing a program |
Example |
Tracing_C_Programs-1.docx |
| Example |
Tracing_C_Programs-2.docx |
|
| Concept:2. | The Edit-Compile-Link-Execute Process
| Topic | Reference Type | Reference Link |
| Notes about the compile, link, execute process |
Tutorial, vocabulary to know about compiling and linking a prgram. |
File: Vocabulary-Creating-a-C-Program.pdf
|
|
| Concept:3. | The Preprocessor (#include, #define)
| Topic | Reference Type | Reference Link |
| Using a preprocessor variable |
Example |
circle.c |
System Include File <stdio.h> |
Summary |
This is the most common include file; it contains declarations (prototypes) for the basic input and output functions and common C functions such as printf, scanf, and getch .
|
System Include File <string.h> |
Example |
string_functions.pdf |
| C Preprocessor |
Tutorial |
c_preprocessors.htm |
| C Preprocessor |
Tutorial |
gcc.gnu.org |
System Include File <stdbool.h> |
Example |
mrb_lib_1.c |
|
| Concept:4. | User Input and Output
| Topic | Reference Type | Reference Link |
| printf format strings |
Presentation by Example |
demo_vars.docx |
| Prompting the user for input |
Example |
circle.c |
| Reading real numbers (double) from the terminal |
Example (using scanf) |
circle.c |
|
| Concept:5. | Variables
|
| Concept:6. | Conditional Programming
|
| Concept:7. | Loops
|
| Concept:8. | Strings
|
| Concept:9. | Functions
|
| Concept:10. | File Input and Output
| Topic | Reference Type | Reference Link |
| File I/O Topics have not yet been covered in C |
|
| Concept:11. | Other References
| Topic | Reference Type | Reference Link |
| ASCII Chart |
Reference |
ASCII Chart |
|
Concept:12. | Testing
- Unit Testing develops a test plan for individual program modules. Test data should execute each possible branch of program processing.
- System Testing develops a test plan to exercise each program module.
- Alpha Testing usually refers to system testing performed by the developers. Additional information.
- Beta Testing usually refers to system testing by real users, but in a test enviornment not in a production environment.
Additional information
- Addional types of testing: Functional testing, non-functional testing, stess testing / load testing, change-related testing, time-based testing.Addional information
|