C Programming
Trimester I Trimester II Trimester III C Curriculum
C Key Concepts
C Activities
C Files
C Key Concepts
C Activities
C Files
C Key Concepts
C Activities
C Files
C Key Concepts

C Programming Trimester III

TOPIC: Key Concepts
Concept:1.Introduction to C Programming
TopicReference TypeReference 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:
  1. 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.
  2. An identifier can not begin with a digit (0-9).
  3. C has many reserved words that can not be identifiers, such as if, int, double, return.
  4. 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.
  5. 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
TopicReference TypeReference 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)
TopicReference TypeReference 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
TopicReference TypeReference 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
TopicReference TypeReference Link
C Variables Tutorial c_variables.htm
Declaring an array of characters Example string_functions.pdf
Declaring pointers to an array of characters Example echostring.pdf
Calculating the area of a circle Example circle.c
Type Casting Tutorial c_type_casting.htm
Declaring variables Presentation by Example demo_vars.docx
Declaring integer variables Presentation by Example demo_vars.docx
Declaring character variables Presentation by Example demo_vars.docx
Declaring variables for character arrays Presentation by Example demo_vars.docx
Declaring double variables Presentation by Example demo_vars.docx
Concept:6.Conditional Programming
TopicReference TypeReference Link
Nested If Statement Example string_functions.pdf
switch Statement Example string_functions.pdf
The switch Statement Presentation switchStatement.pdf
Nested if statement Example switchStatement.pdf
Concept:7.Loops
TopicReference TypeReference Link
for loop Example string_functions.pdf
for loop Example mrb_lib_1.c
for loop Example Tracing_C_Programs-2.docx
while Loop Example Tracing_C_Programs-1.docx
while loop Presentation by Example demo_vars.docx
Concept:8.Strings
TopicReference TypeReference Link
String Concatenation Description, examples, lab hints string_functions.pdf
Terminating the end of a string Exampleechostring.pdf
Functions returning a pointer to an array of characters (string) Definition, how toechostring.pdf
Display a string and each byte position (print_string)Examplemrb_lib_1.c
Function: strtok
Parsing strings using delimiters
Examplestrtok.pdf
Testing if a string contains all binary characters (is_binary)Examplemrb_lib_1.c
Testing individual string positions for specific valuesExamplestring_functions.pdf
strcat
Concatenating one string onto the end of another.
ExampleTracing_C_Programs-1.docx
Reversing a stringExampleTracing_C_Programs-1.docx
len function ExampleTracing_C_Programs-1.docx
Capitalize the first letter of every word in a string. Example Tracing_C_Programs-2.docx
Concept:9.Functions
TopicReference TypeReference Link
Functions Examples echostring.pdf
Returning a pointer to an array of characters (string) from a function Definition, how to echostring.pdf
malloc, Using Example echostring.pdf
Returning a Boolean value from a function Example mrb_lib_1.c
len function Example Tracing_C_Programs-1.docx
void function Example Tracing_C_Programs-1.docx
Concept:10.File Input and Output
TopicReference TypeReference Link
File I/O Topics have not yet been covered in C

Concept:11.Other References
TopicReference TypeReference 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