HemSök efter kurserC-programmering – Grundkurs

C-programmering – Grundkurs

star_fullstar_fullstar_fullstar_fullstar_fullstar_half

This training is aimed at programmers and system engineers who need to maintain existing C- software. You will learn to read, understand, further and redevelop C-code, what provides portability and non-portability and the ANSI standard library. You also get an orientation in modern development tools.


Utbildningsformer
Classroom
Remote

Längd
4 dagar

Pris
31450 kr

Target Audience

Programmers and system engineers who must maintain existing C software. For those who are new developers, it is recommended to go directly to C++ programming.

You will learn:

  • To read and understand all kinds of C-code
  • Maintain and modify/extend existing C-programs
  • Develop new program modules
  • What creates portability and non-portability
  • How the ANSI standard library is structured
  • What modern development tools are available

Pre­requi­si­tes

General knowledge of computer programming and preferably knowledge and experience of another language. The course is normally conducted in a Windows environment, which is why user knowledge of Windows makes it easier.

Course Content C-programming – Basics

1. Introduction

  • Characteristics of language
  • History and standardization
  • The use of C in different environments and for different purposes

2. Overview of C

  • Basic rules of syntax
  • The main function and calls to other functions
  • Variables and types
  • Storage classes and visibility
  • The most common operators
  • Parameter transfer in C - always with value transfer
  • Program flow control
  • Derived, self-defined types

3. The development environment

  • The operating system - usually the Windows tool is processed only to the extent necessary for simple compilation of character-based applications. Debugging functions may also be tested.

4. Variables and types

  • The difference between definition and declaration
  • Naming rules for local and global variables
  • Integer types and floating point types
  • Characters, constant characters and escape sequences

5. Program flow control

  • Several batches in one block
  • Conditions -if and if-else, nested if-else
  • Loops with for, while and do-while
  • The switch statement, alternative to nested if-else statements

6. Expressions and operators

  • What is operator vs operands?
  • The language's groups of operators – arithmetic, logical, comparative and bitwise
  • The lack of logical variable type
  • Priority and associativity
  • The sizeof operator
  • Type checking and implicit/explicit type conversion in C

7. Features

  • Function definition (prototype) vs. definition
  • Structuring using functional decomposition
  • Parameter transfer and return
  • Visibility rules - local variables
  • What actually happens during a function call?
  • Recursive functions – functions that call themselves

8. The preprocessor  

  • Macros – a way to define constants and small functions
  • Inclusion of header files
  • Conditions for the compilation

9. Vectors and pointers

  • Vectors – an indexed array of variables
  • Pointers are memory addresses
  • The relationship between vectors and pointers, a peculiarity of C
  • The ability to use vector names as pointers and pointers as vector names
  • Dynamic memory allocation provides a pointer
  • Strings as a special case
  • Pointers to functions

10. Structures

  • Ability to combine data into larger structures
  • The use of pointers to structures.
  • Various member data
  • Unions, a way to compress data
  • Structure declarations with typedef

11. Modularization

  • Division into header and implementation
  • The header file as interface
  • Visibility rules for modularization

12. The Standard Library  

  • History of standardization
  • Scope and main groups of the standard library - file management, string management, memory management and math functions, etc
  • The ability to use other libraries and APIs

13. Common errors

  • Review of typical errors, logical and syntactic

14. Tools

  • Make files, Debugger and Browsers

15. The future  

Exercises:  

  • A first program in C
  • Calculate circle area
  • Show character representation
  • Convert character representation
  • Calculate type sizes
  • Simple pocket calculator
  • Piecewise shifting and masking
  • Calculate the maximum number
  • Numbers to text
  • Process argument string
  • Count characters in strings
  • Allocate memory dynamically
  • Small index with linked list
  • Construct a stack
  • Program for file copying

Andra har även varit intresserade av dessa kurser: