Advanced C Programming: Optimize Performance and Efficiency
1h 23mAdvanced2022-03-17
Authors

Dan Gookin
Creator, Teacher, and Technology Writer with 20+ years of experience
Course details
Once you've mastered the basics of programming in C, you can concentrate on writing more efficient, more functional code. In this course, Dan Gookin offers some tips to help you extend your C programming skills. Learn how to read and write main function arguments, build more useful variables, and work with arrays and structures. Plus, get tips on generating pointers, and take the practice challenges to test your learning along the way.
Learning objectives
Using assignment operators
Working with arguments in the main function
Setting up global variables
Using static variables
Sorting an array
Building an array of structures
Working with the ampersand (&) and asterisk (*) pointer operators
Learning objectives
Using assignment operators
Working with arguments in the main function
Setting up global variables
Using static variables
Sorting an array
Building an array of structures
Working with the ampersand (&) and asterisk (*) pointer operators
Skills covered
CAdvancedProgramming LanguagesOpen SourceSoftware Development
Concepts
Introduction
- Go beyond the basics of C programming
- What you should know
- Using the exercise files
Programming - Weird-Symbol Roundup
- Assignment operators
- Challenge - Use an assignment operator
- Solution - Use an assignment operator
- Understand the ternary operator
- Challenge - A ternary-operator decision
- Solution - A ternary-operator decision
Main Function Arguments
- Work with arguments in the main() function
- Challenge - Reading command-line arguments
- Solution - Reading the command line
Beyond Basic Variables
- Set up an external variable
- Typecast variables
- Challenge - Specifying a cast
- Solution - Specifying a cast
- Take advantage of static variables
- Challenge - Setting up a static variable
- Solution - Setting up a static variable
Arrays and Structures
- Sort an array
- Challenge - Sort a string
- Solution - Sort a string
- Work with arrays and functions
- Challenge - An array-modification function
- Solution - An array-modification function
- Send a structure to a function
- Challenge - Create a structure function
- Solution - Create a structure function
- Build an array of structures
- Challenge - Sort an array of structures
- Solution - Sort an array of structures
Pointer Tips
- When to use the ampersand operator
- How to bind the asterisk operator
- Challenge - Incrementing a pointer
- Solution - Incrementing a pointer
- Understanding arrays and pointers
- Challenge - Displaying an array
- Solution - Displaying an array
- Obeying the order of precedence
Conclusion
- Next steps