├── .gitignore ├── Template ├── .vscode │ ├── settings.json │ ├── make_build_dir.bat │ ├── make_build_dir.sh │ ├── keybindings.json │ └── c_cpp_properties.json └── main.c ├── Examples ├── S04_L08_Enum │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ ├── example_3.c │ ├── example_1.c │ ├── example_2.c │ ├── example_4.c │ └── example_5.c ├── S04_L04_Integers │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ └── example_1.c ├── S04_L06_Characters │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ ├── example_1.c │ └── example_2.c ├── S04_L07_Booleans │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ └── example_1.c ├── S04_L09_Typedef │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ ├── example_2.c │ └── example_1.c ├── S13_L05_BitFields │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ └── BLE Data Packet.PNG ├── S04_L05_FloatingPoints │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ └── example_1.c ├── S05_L10_SizeofOperator │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ └── example_1.c ├── S06_L02_IfElseStatement │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ ├── example_2.c │ └── example_1.c ├── S06_L05_SwitchStatement │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ └── example_1.c ├── S09_L05_NullPointers │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ └── example.c ├── S13_L02_StructuringData │ └── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json ├── S14_L02_HowToUseUnions │ └── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json ├── S03_L05_WorkingWithVSCode │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ └── example.c ├── S05_L02_ArithmeticOperators │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ ├── example_2.c │ └── example_1.c ├── S05_L04_RelationalOperators │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ ├── example_2.c │ └── example_1.c ├── S05_L05_LogicalOperators │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ └── example_1.c ├── S05_L06_BitwiseOperators │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ └── example_1.c ├── S05_L09_AssignmentOperators │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ └── example_1.c ├── S06_L14_BreakAndContinue │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ ├── example_3.c │ ├── example_2.c │ └── example_1.c ├── S08_L03_DebuggingInVSCode │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ └── debug_example.c ├── S09_L04_PracticeWithPointers │ └── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json ├── S09_L07_FunctionsAndPointers │ └── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json ├── S10_L02_WorkingWithArrays │ └── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json ├── S10_L04_InitializingArrays │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ └── example.c ├── S10_L05_FindTheSizeOfAnArray │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ └── example.c ├── S10_L06_PointersAndArrays │ └── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json ├── S10_L07_PointersArithmetic │ └── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json ├── S10_L09_VariableLengthArrays │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ └── example.c ├── S13_L06_ArraysOfStructures │ └── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json ├── S13_L07_PointersToStructures │ └── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json ├── S13_L10_FlexibleArrayMembers │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ └── BLE Data Packet.PNG ├── S15_L04_FunctionLikeMacros │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ └── example.c ├── S17_L03_BuildYourProject │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ ├── mod1.h │ ├── mod2.h │ ├── led.c │ ├── led.h │ ├── mod1.c │ ├── mod2.c │ └── main.c ├── S08_L04_CommonMistakesInAction │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ └── example.c ├── S10_L08_MultidimensionalArrays │ └── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json ├── S11_L04_StringLengthCopyCompare │ └── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json ├── S13_L04_InitializingStructures │ └── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json ├── S13_L08_StructuresAndFunctions │ └── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json ├── S15_L05_ConditionalCompilation │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ └── example.c ├── S16_L07_LetsPracticeWithFileIO │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ └── samples.bin ├── S05_L03_IncrementDecrementOperators │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ ├── example_1.c │ ├── example_2.c │ └── example_3.c ├── S08_L05_CommonMistakesInActionTake2 │ └── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json ├── S10_L03_DefiningAndAccessingArrays │ └── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json ├── S11_L07_StringSearchingAndTokenization │ └── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json ├── S11_L12_PracticeWithNumericConversion │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ └── example.c ├── S13_L03_DefiningAndAccessingStructures │ └── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json ├── S13_L09_PointersVersusArraysMembers │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ └── example.c └── S03_L02_RunYourFirstCProgram │ └── example.c ├── Challenges ├── S05_Challenge_Sphere │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ └── sphere.c ├── S06_Challenge_EvenOdd │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ └── even_odd.c ├── S05_Challenge_BitSelector │ └── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json ├── S06_Challenge_PrimeNumbers │ └── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json ├── S06_Challenge_SigmaDrawing │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ └── sigma_drawing.c ├── S06_Challenge_WeekDays │ └── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json ├── S10_Challenge_RandomMatrix │ └── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json ├── S11_Challenge_GetTheLine │ └── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json ├── S11_Challenge_MoveTheRook │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ └── Rook Chess.png ├── S04_Challenge_BunchOfConstants │ └── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json ├── S04_Challenge_SpaceshipThrust │ └── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json ├── S06_Challenge_MinimumPowerOf2 │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ └── minimum_power_of_2.c ├── S09_Challenge_SimpleSwapper │ ├── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json │ └── simple_swapper.c ├── S06_Challenge_PlanetaryAlignment │ └── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json ├── S07_Challenge_PrimeNumbersImproved │ └── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json ├── S09_Challenge_FloatDecomposition │ └── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json ├── S12_Challenge_GetTheLineDynamically │ └── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json ├── S10_Challenge_PrimeNumbersFurtherImproved │ └── .vscode │ │ ├── settings.json │ │ ├── make_build_dir.bat │ │ ├── make_build_dir.sh │ │ ├── keybindings.json │ │ └── c_cpp_properties.json └── S13_Challenge_WorkoutsHeartRateMonitor │ └── .vscode │ ├── settings.json │ ├── make_build_dir.bat │ ├── make_build_dir.sh │ ├── keybindings.json │ └── c_cpp_properties.json └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | -------------------------------------------------------------------------------- /Template/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S04_L08_Enum/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S04_L04_Integers/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S04_L06_Characters/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S04_L07_Booleans/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S04_L09_Typedef/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S13_L05_BitFields/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Challenges/S05_Challenge_Sphere/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Challenges/S06_Challenge_EvenOdd/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S04_L05_FloatingPoints/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S05_L10_SizeofOperator/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S06_L02_IfElseStatement/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S06_L05_SwitchStatement/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S09_L05_NullPointers/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S13_L02_StructuringData/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S14_L02_HowToUseUnions/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Challenges/S05_Challenge_BitSelector/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Challenges/S06_Challenge_PrimeNumbers/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Challenges/S06_Challenge_SigmaDrawing/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Challenges/S06_Challenge_WeekDays/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Challenges/S10_Challenge_RandomMatrix/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Challenges/S11_Challenge_GetTheLine/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Challenges/S11_Challenge_MoveTheRook/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S03_L05_WorkingWithVSCode/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S05_L02_ArithmeticOperators/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S05_L04_RelationalOperators/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S05_L05_LogicalOperators/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S05_L06_BitwiseOperators/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S05_L09_AssignmentOperators/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S06_L14_BreakAndContinue/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S08_L03_DebuggingInVSCode/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S09_L04_PracticeWithPointers/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S09_L07_FunctionsAndPointers/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S10_L02_WorkingWithArrays/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S10_L04_InitializingArrays/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S10_L05_FindTheSizeOfAnArray/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S10_L06_PointersAndArrays/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S10_L07_PointersArithmetic/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S10_L09_VariableLengthArrays/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S13_L06_ArraysOfStructures/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S13_L07_PointersToStructures/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S13_L10_FlexibleArrayMembers/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S15_L04_FunctionLikeMacros/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S17_L03_BuildYourProject/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Challenges/S04_Challenge_BunchOfConstants/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Challenges/S04_Challenge_SpaceshipThrust/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Challenges/S06_Challenge_MinimumPowerOf2/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Challenges/S09_Challenge_SimpleSwapper/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S08_L04_CommonMistakesInAction/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S10_L08_MultidimensionalArrays/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S11_L04_StringLengthCopyCompare/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S13_L04_InitializingStructures/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S13_L08_StructuresAndFunctions/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S15_L05_ConditionalCompilation/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S16_L07_LetsPracticeWithFileIO/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Challenges/S06_Challenge_PlanetaryAlignment/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Challenges/S07_Challenge_PrimeNumbersImproved/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Challenges/S09_Challenge_FloatDecomposition/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Challenges/S12_Challenge_GetTheLineDynamically/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S05_L03_IncrementDecrementOperators/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S08_L05_CommonMistakesInActionTake2/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S10_L03_DefiningAndAccessingArrays/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S11_L07_StringSearchingAndTokenization/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S11_L12_PracticeWithNumericConversion/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S13_L03_DefiningAndAccessingStructures/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Examples/S13_L09_PointersVersusArraysMembers/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Challenges/S10_Challenge_PrimeNumbersFurtherImproved/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Challenges/S13_Challenge_WorkoutsHeartRateMonitor/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "window.zoomLevel": 2 3 | } 4 | -------------------------------------------------------------------------------- /Template/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | return EXIT_SUCCESS; 7 | } 8 | -------------------------------------------------------------------------------- /Examples/S17_L03_BuildYourProject/mod1.h: -------------------------------------------------------------------------------- 1 | #ifndef MOD1_H 2 | #define MOD1_H 3 | 4 | #include "led.h" 5 | 6 | void print_mod1(); 7 | 8 | #endif -------------------------------------------------------------------------------- /Examples/S17_L03_BuildYourProject/mod2.h: -------------------------------------------------------------------------------- 1 | #ifndef MOD2_H 2 | #define MOD2_H 3 | 4 | #include "led.h" 5 | 6 | void print_mod2(); 7 | 8 | #endif -------------------------------------------------------------------------------- /Template/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S04_L08_Enum/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S04_L04_Integers/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S04_L06_Characters/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S04_L07_Booleans/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S04_L09_Typedef/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S13_L05_BitFields/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Template/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Challenges/S05_Challenge_Sphere/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Challenges/S06_Challenge_EvenOdd/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S04_L05_FloatingPoints/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S05_L10_SizeofOperator/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S06_L02_IfElseStatement/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S06_L05_SwitchStatement/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S09_L05_NullPointers/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S13_L02_StructuringData/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S13_L05_BitFields/BLE Data Packet.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytegarage/c-programming-bootcamp/HEAD/Examples/S13_L05_BitFields/BLE Data Packet.PNG -------------------------------------------------------------------------------- /Examples/S14_L02_HowToUseUnions/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Challenges/S05_Challenge_BitSelector/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Challenges/S06_Challenge_PrimeNumbers/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Challenges/S06_Challenge_SigmaDrawing/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Challenges/S06_Challenge_WeekDays/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Challenges/S10_Challenge_RandomMatrix/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Challenges/S11_Challenge_GetTheLine/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Challenges/S11_Challenge_MoveTheRook/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S03_L05_WorkingWithVSCode/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S05_L02_ArithmeticOperators/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S05_L04_RelationalOperators/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S05_L05_LogicalOperators/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S05_L06_BitwiseOperators/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S05_L09_AssignmentOperators/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S06_L14_BreakAndContinue/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S08_L03_DebuggingInVSCode/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S09_L04_PracticeWithPointers/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S09_L07_FunctionsAndPointers/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S10_L02_WorkingWithArrays/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S10_L04_InitializingArrays/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S10_L05_FindTheSizeOfAnArray/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S10_L06_PointersAndArrays/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S10_L07_PointersArithmetic/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S10_L09_VariableLengthArrays/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S13_L06_ArraysOfStructures/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S13_L07_PointersToStructures/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S13_L10_FlexibleArrayMembers/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S15_L04_FunctionLikeMacros/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S17_L03_BuildYourProject/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Challenges/S04_Challenge_BunchOfConstants/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Challenges/S04_Challenge_SpaceshipThrust/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Challenges/S06_Challenge_MinimumPowerOf2/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Challenges/S09_Challenge_SimpleSwapper/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Challenges/S11_Challenge_MoveTheRook/Rook Chess.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytegarage/c-programming-bootcamp/HEAD/Challenges/S11_Challenge_MoveTheRook/Rook Chess.png -------------------------------------------------------------------------------- /Examples/S04_L08_Enum/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S08_L04_CommonMistakesInAction/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S10_L08_MultidimensionalArrays/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S11_L04_StringLengthCopyCompare/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S13_L04_InitializingStructures/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S13_L08_StructuresAndFunctions/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S15_L05_ConditionalCompilation/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S16_L07_LetsPracticeWithFileIO/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S16_L07_LetsPracticeWithFileIO/samples.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytegarage/c-programming-bootcamp/HEAD/Examples/S16_L07_LetsPracticeWithFileIO/samples.bin -------------------------------------------------------------------------------- /Challenges/S06_Challenge_PlanetaryAlignment/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Challenges/S07_Challenge_PrimeNumbersImproved/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Challenges/S09_Challenge_FloatDecomposition/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Challenges/S12_Challenge_GetTheLineDynamically/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S04_L04_Integers/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S04_L06_Characters/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S04_L07_Booleans/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S04_L09_Typedef/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S05_L03_IncrementDecrementOperators/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S08_L05_CommonMistakesInActionTake2/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S10_L03_DefiningAndAccessingArrays/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S11_L07_StringSearchingAndTokenization/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S11_L12_PracticeWithNumericConversion/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S13_L03_DefiningAndAccessingStructures/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S13_L05_BitFields/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S13_L09_PointersVersusArraysMembers/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Challenges/S05_Challenge_Sphere/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Challenges/S06_Challenge_EvenOdd/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Challenges/S06_Challenge_WeekDays/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Challenges/S10_Challenge_PrimeNumbersFurtherImproved/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Challenges/S13_Challenge_WorkoutsHeartRateMonitor/.vscode/make_build_dir.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set BUILD_DIR=%cd%\build 4 | if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%" 5 | 6 | -------------------------------------------------------------------------------- /Examples/S04_L05_FloatingPoints/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S05_L05_LogicalOperators/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S05_L06_BitwiseOperators/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S05_L10_SizeofOperator/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S06_L02_IfElseStatement/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S06_L05_SwitchStatement/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S06_L14_BreakAndContinue/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S09_L05_NullPointers/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S13_L02_StructuringData/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S13_L10_FlexibleArrayMembers/BLE Data Packet.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytegarage/c-programming-bootcamp/HEAD/Examples/S13_L10_FlexibleArrayMembers/BLE Data Packet.PNG -------------------------------------------------------------------------------- /Examples/S14_L02_HowToUseUnions/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S17_L03_BuildYourProject/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Challenges/S05_Challenge_BitSelector/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Challenges/S06_Challenge_PrimeNumbers/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Challenges/S06_Challenge_SigmaDrawing/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Challenges/S09_Challenge_SimpleSwapper/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Challenges/S10_Challenge_RandomMatrix/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Challenges/S11_Challenge_GetTheLine/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Challenges/S11_Challenge_MoveTheRook/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S03_L05_WorkingWithVSCode/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S05_L02_ArithmeticOperators/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S05_L04_RelationalOperators/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S05_L09_AssignmentOperators/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S08_L03_DebuggingInVSCode/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S09_L04_PracticeWithPointers/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S09_L07_FunctionsAndPointers/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S10_L02_WorkingWithArrays/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S10_L04_InitializingArrays/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S10_L05_FindTheSizeOfAnArray/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S10_L06_PointersAndArrays/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S10_L07_PointersArithmetic/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S10_L09_VariableLengthArrays/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S13_L06_ArraysOfStructures/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S13_L07_PointersToStructures/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S13_L10_FlexibleArrayMembers/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S15_L04_FunctionLikeMacros/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Challenges/S04_Challenge_BunchOfConstants/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Challenges/S04_Challenge_SpaceshipThrust/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Challenges/S06_Challenge_MinimumPowerOf2/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Challenges/S06_Challenge_PlanetaryAlignment/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Challenges/S09_Challenge_FloatDecomposition/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S08_L04_CommonMistakesInAction/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S10_L03_DefiningAndAccessingArrays/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S10_L08_MultidimensionalArrays/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S11_L04_StringLengthCopyCompare/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S13_L04_InitializingStructures/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S13_L08_StructuresAndFunctions/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S15_L05_ConditionalCompilation/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S16_L07_LetsPracticeWithFileIO/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S17_L03_BuildYourProject/led.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "led.h" 3 | 4 | void print_led_state(Led led) 5 | { 6 | printf("%s", led == LED_OFF ? "LED_OFF" : "LED_ON"); 7 | } -------------------------------------------------------------------------------- /Challenges/S07_Challenge_PrimeNumbersImproved/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Challenges/S12_Challenge_GetTheLineDynamically/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S05_L03_IncrementDecrementOperators/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S08_L05_CommonMistakesInActionTake2/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S11_L07_StringSearchingAndTokenization/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S11_L12_PracticeWithNumericConversion/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S13_L03_DefiningAndAccessingStructures/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S13_L09_PointersVersusArraysMembers/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Challenges/S10_Challenge_PrimeNumbersFurtherImproved/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Challenges/S13_Challenge_WorkoutsHeartRateMonitor/.vscode/make_build_dir.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | BUILD_DIR="`pwd`/build" 4 | 5 | if [ ! -d "${BUILD_DIR}" ]; 6 | then mkdir "${BUILD_DIR}"; 7 | fi -------------------------------------------------------------------------------- /Examples/S17_L03_BuildYourProject/led.h: -------------------------------------------------------------------------------- 1 | #ifndef LED_H 2 | #define LED_H 3 | 4 | #define LED_ON 1 5 | #define LED_OFF 0 6 | 7 | typedef int Led; 8 | 9 | void print_led_state(Led led); 10 | 11 | #endif -------------------------------------------------------------------------------- /Examples/S03_L02_RunYourFirstCProgram/example.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | 5 | int main() 6 | { 7 | int number = 10000; 8 | printf("Hello world!\n"); 9 | return EXIT_SUCCESS; 10 | } -------------------------------------------------------------------------------- /Examples/S17_L03_BuildYourProject/mod1.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "mod1.h" 3 | 4 | void print_mod1() 5 | { 6 | Led led = LED_ON; 7 | printf("This is mod1, led: "); 8 | print_led_state(led); 9 | printf("\n"); 10 | } -------------------------------------------------------------------------------- /Examples/S17_L03_BuildYourProject/mod2.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "mod2.h" 3 | 4 | void print_mod2() 5 | { 6 | Led led = LED_OFF; 7 | printf("This is mod2, led: "); 8 | print_led_state(led); 9 | printf("\n"); 10 | } -------------------------------------------------------------------------------- /Examples/S04_L07_Booleans/example_1.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int main() 6 | { 7 | bool a = true; 8 | bool b = false; 9 | 10 | printf("a (true): %d\n", a); 11 | printf("b (false): %d\n", b); 12 | 13 | printf("\n\n=== ByteGarage ===\n\n"); 14 | return EXIT_SUCCESS; 15 | } 16 | -------------------------------------------------------------------------------- /Examples/S17_L03_BuildYourProject/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "mod1.h" 5 | #include "mod2.h" 6 | 7 | int main() 8 | { 9 | printf("\n=== Build Your Project ===\n\n"); 10 | 11 | print_mod1(); 12 | print_mod2(); 13 | 14 | printf("\n\n=== ByteGarage ===\n\n"); 15 | return EXIT_SUCCESS; 16 | } 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # C Programming Bootcamp 2 | 3 | Welcome to **[Byte Garage](https://bytegarage.co/)**'s brand new C Programming Bootcamp! 4 | 5 | Here you can find all the examples and challenges that are faced during the course. 6 | 7 | ## Template 8 | 9 | Copy and paste the Template folder to speed up the startup of your next C program in [Visual Studio Code](https://code.visualstudio.com/docs/languages/cpp#_hello-world). 10 | 11 | -------------------------------------------------------------------------------- /Template/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S04_L08_Enum/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S04_L04_Integers/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S04_L07_Booleans/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S04_L08_Enum/example_3.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | enum menu 5 | { 6 | TEA, 7 | COFFEE, 8 | JUICE = 100, 9 | BEER, 10 | }; 11 | 12 | int main() 13 | { 14 | enum menu mario = COFFEE; 15 | enum menu andrea = BEER; 16 | 17 | printf("Mario: %d\n", mario); 18 | printf("Andrea: %d\n", andrea); 19 | 20 | printf("\n\n=== ByteGarage ===\n\n"); 21 | return EXIT_SUCCESS; 22 | } 23 | -------------------------------------------------------------------------------- /Examples/S04_L09_Typedef/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S13_L05_BitFields/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Challenges/S05_Challenge_Sphere/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S04_L05_FloatingPoints/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S04_L06_Characters/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S05_L10_SizeofOperator/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S09_L05_NullPointers/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S14_L02_HowToUseUnions/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Challenges/S05_Challenge_BitSelector/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Challenges/S06_Challenge_EvenOdd/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Challenges/S06_Challenge_WeekDays/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Challenges/S11_Challenge_GetTheLine/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Challenges/S11_Challenge_MoveTheRook/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S03_L05_WorkingWithVSCode/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S05_L02_ArithmeticOperators/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S05_L04_RelationalOperators/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S05_L05_LogicalOperators/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S05_L06_BitwiseOperators/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S05_L09_AssignmentOperators/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S06_L02_IfElseStatement/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S06_L02_IfElseStatement/example_2.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int a = -1; 7 | 8 | if (!a) //same as (a == 0) 9 | { 10 | printf("a == 0\n"); 11 | } 12 | else if (a < 0) 13 | { 14 | printf("a < 0\n"); 15 | } 16 | else if (a > 0) 17 | { 18 | printf("a > 0\n"); 19 | } 20 | 21 | printf("\n\n=== ByteGarage ===\n\n"); 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /Examples/S06_L05_SwitchStatement/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S06_L14_BreakAndContinue/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S08_L03_DebuggingInVSCode/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S10_L02_WorkingWithArrays/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S10_L04_InitializingArrays/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S10_L06_PointersAndArrays/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S10_L07_PointersArithmetic/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S13_L02_StructuringData/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S13_L06_ArraysOfStructures/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S15_L04_FunctionLikeMacros/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S17_L03_BuildYourProject/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Challenges/S04_Challenge_BunchOfConstants/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Challenges/S04_Challenge_SpaceshipThrust/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Challenges/S06_Challenge_MinimumPowerOf2/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Challenges/S06_Challenge_PrimeNumbers/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Challenges/S06_Challenge_SigmaDrawing/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Challenges/S09_Challenge_SimpleSwapper/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Challenges/S10_Challenge_RandomMatrix/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S04_L08_Enum/example_1.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | enum menu 5 | { 6 | TEA, //0 7 | COFFEE, //1 8 | JUICE, //2 9 | BEER, //3 10 | }; 11 | 12 | int main() 13 | { 14 | enum menu mario = COFFEE; 15 | enum menu andrea = BEER; 16 | 17 | printf("Mario: %d\n", mario); 18 | printf("Andrea: %d\n", andrea); 19 | 20 | printf("\n\n=== ByteGarage ===\n\n"); 21 | return EXIT_SUCCESS; 22 | } 23 | -------------------------------------------------------------------------------- /Examples/S04_L08_Enum/example_2.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | enum menu 5 | { 6 | TEA = 10, 7 | COFFEE = 20, 8 | JUICE = 30, 9 | BEER = 40, 10 | }; 11 | 12 | int main() 13 | { 14 | enum menu mario = COFFEE; 15 | enum menu andrea = BEER; 16 | 17 | printf("Mario: %d\n", mario); 18 | printf("Andrea: %d\n", andrea); 19 | 20 | printf("\n\n=== ByteGarage ===\n\n"); 21 | return EXIT_SUCCESS; 22 | } 23 | -------------------------------------------------------------------------------- /Examples/S04_L09_Typedef/example_2.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | typedef enum 5 | { 6 | TEA, //0 7 | COFFEE, //1 8 | JUICE, //2 9 | BEER, //3 10 | } Menu; 11 | 12 | int main() 13 | { 14 | Menu mario = COFFEE; 15 | Menu andrea = BEER; 16 | 17 | printf("Mario: %d\n", mario); 18 | printf("Andrea: %d\n", andrea); 19 | 20 | printf("\n\n=== ByteGarage ===\n\n"); 21 | return EXIT_SUCCESS; 22 | } 23 | -------------------------------------------------------------------------------- /Examples/S08_L04_CommonMistakesInAction/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S09_L04_PracticeWithPointers/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S09_L07_FunctionsAndPointers/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S10_L05_FindTheSizeOfAnArray/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S10_L08_MultidimensionalArrays/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S10_L09_VariableLengthArrays/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S11_L04_StringLengthCopyCompare/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S13_L04_InitializingStructures/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S13_L07_PointersToStructures/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S13_L08_StructuresAndFunctions/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S13_L10_FlexibleArrayMembers/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S15_L05_ConditionalCompilation/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S16_L07_LetsPracticeWithFileIO/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Challenges/S06_Challenge_PlanetaryAlignment/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Challenges/S07_Challenge_PrimeNumbersImproved/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Challenges/S09_Challenge_FloatDecomposition/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Challenges/S12_Challenge_GetTheLineDynamically/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S04_L09_Typedef/example_1.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | enum menu 5 | { 6 | TEA, //0 7 | COFFEE, //1 8 | JUICE, //2 9 | BEER, //3 10 | }; 11 | 12 | int main() 13 | { 14 | enum menu mario = COFFEE; 15 | enum menu andrea = BEER; 16 | 17 | printf("Mario: %d\n", mario); 18 | printf("Andrea: %d\n", andrea); 19 | 20 | printf("\n\n=== ByteGarage ===\n\n"); 21 | return EXIT_SUCCESS; 22 | } 23 | -------------------------------------------------------------------------------- /Examples/S05_L03_IncrementDecrementOperators/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S08_L05_CommonMistakesInActionTake2/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S10_L03_DefiningAndAccessingArrays/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S11_L12_PracticeWithNumericConversion/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S13_L09_PointersVersusArraysMembers/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Challenges/S13_Challenge_WorkoutsHeartRateMonitor/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S11_L07_StringSearchingAndTokenization/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S13_L03_DefiningAndAccessingStructures/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Challenges/S10_Challenge_PrimeNumbersFurtherImproved/.vscode/keybindings.json: -------------------------------------------------------------------------------- 1 | /* !!! 2 | * Add keybindings to: 3 | * Command Palette (Ctrl+Shift+P) -> Preferences: Open Keyboard Shortcutss -> Open Keyboard Shortcuts (top rigth icon) 4 | * 5 | * checkout: https://code.visualstudio.com/docs/getstarted/keybindings# 6 | */ 7 | [ 8 | { 9 | "key": "ctrl+shift+alt+c", 10 | "command": "workbench.action.tasks.runTask", 11 | "args": "clean build" 12 | } 13 | ] -------------------------------------------------------------------------------- /Examples/S03_L05_WorkingWithVSCode/example.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | printf("\n=== Working With VSCode ===\n\n"); 7 | 8 | int girls = 12; 9 | int boys = 9; 10 | int students = girls + boys; 11 | 12 | printf("In the classroom, there are:\n"); 13 | printf("\t%d girls\n", girls); 14 | printf("\t%d boys\n", boys); 15 | printf("giving a total of %d students.\n", students); 16 | 17 | printf("\n\n=== ByteGarage ===\n\n"); 18 | return EXIT_SUCCESS; 19 | } 20 | -------------------------------------------------------------------------------- /Examples/S06_L02_IfElseStatement/example_1.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int a = -1; 7 | 8 | if (a) //same as (a != 0) 9 | { 10 | printf("a != 0\n"); 11 | } 12 | else 13 | { 14 | printf("a == 0\n"); 15 | } 16 | 17 | if (!a) //same as (a == 0) 18 | { 19 | printf("a == 0\n"); 20 | } 21 | else 22 | { 23 | printf("a != 0\n"); 24 | } 25 | 26 | printf("\n\n=== ByteGarage ===\n\n"); 27 | return 0; 28 | } 29 | -------------------------------------------------------------------------------- /Examples/S06_L14_BreakAndContinue/example_3.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int input, accumulator = 0; 7 | const int ITERATIONS = 5; 8 | 9 | for (int i = 0; i < ITERATIONS; i++) 10 | { 11 | printf("Enter an integer > 0: "); 12 | scanf("%d", &input); 13 | 14 | accumulator += input > 0 ? input : 0; 15 | } 16 | 17 | printf("\nAccumulator: %d\n", accumulator); 18 | 19 | printf("\n\n=== ByteGarage ===\n\n"); 20 | return EXIT_SUCCESS; 21 | } 22 | -------------------------------------------------------------------------------- /Examples/S05_L03_IncrementDecrementOperators/example_1.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | 7 | int a, b; 8 | 9 | a = 0; 10 | b = a++; 11 | 12 | printf("After postincrement\n"); 13 | printf("A: %d\n", a); 14 | printf("B: %d\n", b); 15 | printf("\n"); 16 | 17 | a = 0; 18 | b = ++a; 19 | 20 | printf("After preincrement\n"); 21 | printf("A: %d\n", a); 22 | printf("B: %d\n", b); 23 | 24 | printf("\n\n=== ByteGarage ===\n\n"); 25 | return EXIT_SUCCESS; 26 | } 27 | -------------------------------------------------------------------------------- /Examples/S04_L06_Characters/example_1.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | char c = 'A'; 7 | 8 | printf("char c: %d\n", c); 9 | printf("char c: %c\n", c); 10 | 11 | c = 66; 12 | printf("char c: %c\n", c); 13 | 14 | // Acquire user input 15 | printf("Input a character: "); 16 | c = getchar(); 17 | printf("You entered: %c\n", c); 18 | 19 | c = getchar(); 20 | printf("You entered: %c\n", c); 21 | 22 | printf("\n\n=== ByteGarage ===\n\n"); 23 | return EXIT_SUCCESS; 24 | } 25 | -------------------------------------------------------------------------------- /Examples/S05_L03_IncrementDecrementOperators/example_2.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | 7 | float a, b; 8 | 9 | a = 3.14; 10 | b = a++; 11 | 12 | printf("After postincrement\n"); 13 | printf("A: %.2f\n", a); 14 | printf("B: %.2f\n", b); 15 | printf("\n"); 16 | 17 | a = 3.14; 18 | b = ++a; 19 | 20 | printf("After preincrement\n"); 21 | printf("A: %.2f\n", a); 22 | printf("B: %.2f\n", b); 23 | 24 | printf("\n\n=== ByteGarage ===\n\n"); 25 | return EXIT_SUCCESS; 26 | } 27 | -------------------------------------------------------------------------------- /Examples/S05_L03_IncrementDecrementOperators/example_3.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | 7 | int a, b; 8 | 9 | a = 0; 10 | b = a++ * 2 + 1; 11 | 12 | printf("After postincrement\n"); 13 | printf("A: %d\n", a); 14 | printf("B: %d\n", b); 15 | printf("\n"); 16 | 17 | a = 0; 18 | b = ++a * 2 + 1; 19 | 20 | printf("After preincrement\n"); 21 | printf("A: %d\n", a); 22 | printf("B: %d\n", b); 23 | 24 | printf("\n\n=== ByteGarage ===\n\n"); 25 | return EXIT_SUCCESS; 26 | } 27 | -------------------------------------------------------------------------------- /Examples/S05_L04_RelationalOperators/example_2.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | char a = 'a'; 7 | char b = 'z'; 8 | 9 | printf("A = %c\n", a); 10 | printf("B = %c\n", b); 11 | printf("\n"); 12 | 13 | printf("A == B --> %d\n", a == b); 14 | printf("A != B --> %d\n", a != b); 15 | printf("A > B --> %d\n", a > b); 16 | printf("A < B --> %d\n", a < b); 17 | printf("A >= B --> %d\n", a >= b); 18 | printf("A <= B --> %d\n", a <= b); 19 | 20 | printf("\n\n=== ByteGarage ===\n\n"); 21 | return EXIT_SUCCESS; 22 | } 23 | -------------------------------------------------------------------------------- /Examples/S04_L08_Enum/example_4.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | enum months 5 | { 6 | JAN, 7 | FEB, 8 | MAR, 9 | APR, 10 | MAY, 11 | JUN, 12 | JUL, 13 | AUG, 14 | SEP, 15 | OCT, 16 | NOV, 17 | DEC, 18 | }; 19 | 20 | int main() 21 | { 22 | enum months myFavoriteMonth = JUL; 23 | enum months myWorstMonth = NOV; 24 | 25 | printf("Andrea's favorite month is: %d\n", myFavoriteMonth); 26 | printf("Andrea's worst month is: %d\n", myWorstMonth); 27 | 28 | printf("\n\n=== ByteGarage ===\n\n"); 29 | return EXIT_SUCCESS; 30 | } 31 | -------------------------------------------------------------------------------- /Examples/S06_L14_BreakAndContinue/example_2.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int input, accumulator = 0; 7 | const int ITERATIONS = 5; 8 | 9 | for (int i = 0; i < ITERATIONS; i++) 10 | { 11 | printf("Enter an integer > 0: "); 12 | scanf("%d", &input); 13 | 14 | if (input < 0) 15 | { 16 | continue; 17 | } 18 | 19 | accumulator += input; 20 | } 21 | 22 | printf("\nAccumulator: %d\n", accumulator); 23 | 24 | printf("\n\n=== ByteGarage ===\n\n"); 25 | return EXIT_SUCCESS; 26 | } 27 | -------------------------------------------------------------------------------- /Examples/S04_L08_Enum/example_5.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | enum months 5 | { 6 | JAN = 1, 7 | FEB, 8 | MAR, 9 | APR, 10 | MAY, 11 | JUN, 12 | JUL, 13 | AUG, 14 | SEP, 15 | OCT, 16 | NOV, 17 | DEC, 18 | }; 19 | 20 | int main() 21 | { 22 | enum months myFavoriteMonth = JUL; 23 | enum months myWorstMonth = NOV; 24 | 25 | printf("Andrea's favorite month is: %d\n", myFavoriteMonth); 26 | printf("Andrea's worst month is: %d\n", myWorstMonth); 27 | 28 | printf("\n\n=== ByteGarage ===\n\n"); 29 | return EXIT_SUCCESS; 30 | } 31 | -------------------------------------------------------------------------------- /Examples/S06_L14_BreakAndContinue/example_1.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int input, accumulator = 0; 7 | const int ITERATIONS = 10; 8 | 9 | for (int i = 0; i < ITERATIONS; i++) 10 | { 11 | printf("Enter an integer (-1 to exit): "); 12 | scanf("%d", &input); 13 | 14 | if (input == -1) 15 | { 16 | break; 17 | } 18 | 19 | accumulator += input; 20 | } 21 | 22 | printf("\nAccumulator: %d\n", accumulator); 23 | 24 | printf("\n\n=== ByteGarage ===\n\n"); 25 | return EXIT_SUCCESS; 26 | } 27 | -------------------------------------------------------------------------------- /Examples/S05_L04_RelationalOperators/example_1.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int a, b; 7 | 8 | printf("Enter operand A (int): "); 9 | scanf("%d", &a); 10 | printf("Enter operand B (int): "); 11 | scanf("%d", &b); 12 | printf("\n"); 13 | 14 | printf("A == B --> %d\n", a == b); 15 | printf("A != B --> %d\n", a != b); 16 | printf("A > B --> %d\n", a > b); 17 | printf("A < B --> %d\n", a < b); 18 | printf("A >= B --> %d\n", a >= b); 19 | printf("A <= B --> %d\n", a <= b); 20 | 21 | printf("\n\n=== ByteGarage ===\n\n"); 22 | return EXIT_SUCCESS; 23 | } 24 | -------------------------------------------------------------------------------- /Examples/S05_L09_AssignmentOperators/example_1.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int a, b = 3; 7 | printf("b = %d\n", b); 8 | 9 | a = b; 10 | printf("a = b --> a = %d\n", a); 11 | 12 | a += b; // a = a + b 13 | printf("a += b --> a = %d\n", a); 14 | 15 | a -= b; 16 | printf("a -= b --> a = %d\n", a); 17 | 18 | a *= b; 19 | printf("a *= b --> a = %d\n", a); 20 | 21 | a /= b; 22 | printf("a /= b --> a = %d\n", a); 23 | 24 | a %= b; 25 | printf("a %%= b --> a = %d\n", a); 26 | 27 | printf("\n\n=== ByteGarage ===\n\n"); 28 | return EXIT_SUCCESS; 29 | } 30 | -------------------------------------------------------------------------------- /Examples/S04_L06_Characters/example_2.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int main() 6 | { 7 | char c = 'A'; 8 | printf("c = '%c'\n", c); 9 | printf("is lower case: %d\n", islower(c)); 10 | printf("is upper case: %d\n", isupper(c)); 11 | printf("is digit %d\n", isdigit(c)); 12 | printf("\n"); 13 | 14 | c = tolower(c); 15 | printf("to lower case: '%c'\n", c); 16 | printf("\n"); 17 | 18 | c = '0'; 19 | printf("c = '%c'\n", c); 20 | printf("is digit %d\n", isdigit(c)); 21 | 22 | printf("\n\n=== ByteGarage ===\n\n"); 23 | return EXIT_SUCCESS; 24 | } 25 | -------------------------------------------------------------------------------- /Examples/S05_L02_ArithmeticOperators/example_2.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | float a, b, c; 7 | 8 | printf("Enter A operand (float): "); 9 | scanf("%f", &a); 10 | 11 | printf("Enter B operand (float): "); 12 | scanf("%f", &b); 13 | printf("\n"); 14 | 15 | c = a + b; 16 | printf("C = A + B --> %9.3f\n", c); 17 | 18 | c = a - b; 19 | printf("C = A - B --> %9.3f\n", c); 20 | 21 | c = a * b; 22 | printf("C = A * B --> %9.3f\n", c); 23 | 24 | c = a / b; 25 | printf("C = A / B --> %9.3f\n", c); 26 | 27 | printf("\n\n=== ByteGarage ===\n\n"); 28 | return EXIT_SUCCESS; 29 | } 30 | -------------------------------------------------------------------------------- /Examples/S05_L10_SizeofOperator/example_1.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int main() 6 | { 7 | int variable = 0; 8 | printf("%llu\n", sizeof(variable)); 9 | printf("%llu\n", sizeof(int)); 10 | printf("%llu\n", sizeof(long int)); 11 | printf("%llu\n", sizeof(long long int)); 12 | printf("%llu\n", sizeof(char)); 13 | printf("%llu\n", sizeof(int16_t)); 14 | printf("%llu\n", sizeof(int32_t)); 15 | printf("%llu\n", sizeof(int64_t)); 16 | printf("%llu\n", sizeof(123 && 456)); 17 | printf("%llu\n", sizeof(123LL && 456LL)); 18 | 19 | printf("\n\n=== ByteGarage ===\n\n"); 20 | return EXIT_SUCCESS; 21 | } 22 | -------------------------------------------------------------------------------- /Examples/S08_L03_DebuggingInVSCode/debug_example.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int cumulativeSum(int limit) 5 | { 6 | int result = 0; 7 | for (int i = 1; i <= limit; i++) 8 | { 9 | result += i; 10 | } 11 | return result; 12 | } 13 | 14 | int main() 15 | { 16 | int number = 12; 17 | int factor = 2; 18 | 19 | printf("number before multiplication: %d\n", number); 20 | 21 | number *= factor; 22 | 23 | printf("number after multiplication: %d\n", number); 24 | 25 | int sum = cumulativeSum(number); 26 | 27 | printf("cumulative sum of %d: %d\n", number, sum); 28 | 29 | printf("\n\n=== ByteGarage ===\n\n"); 30 | return EXIT_SUCCESS; 31 | } 32 | -------------------------------------------------------------------------------- /Examples/S05_L02_ArithmeticOperators/example_1.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | int a, b, c; 7 | 8 | printf("Enter A operand (int): "); 9 | scanf("%d", &a); 10 | 11 | printf("Enter B operand (int): "); 12 | scanf("%d", &b); 13 | printf("\n"); 14 | 15 | c = a + b; 16 | printf("C = A + B --> %d\n", c); 17 | 18 | c = a - b; 19 | printf("C = A - B --> %d\n", c); 20 | 21 | c = a * b; 22 | printf("C = A * B --> %d\n", c); 23 | 24 | c = a / b; 25 | printf("C = A / B --> %d\n", c); 26 | 27 | c = a % b; // remainder of a / b 28 | printf("C = A %% B --> %d\n", c); 29 | 30 | printf("\n\n=== ByteGarage ===\n\n"); 31 | return EXIT_SUCCESS; 32 | } 33 | -------------------------------------------------------------------------------- /Examples/S09_L05_NullPointers/example.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | printf("\n=== NULL pointers ===\n"); 7 | 8 | int *ptr = NULL; 9 | 10 | /* Execute only if ptr isn't null */ 11 | if (ptr) //if (ptr != NULL) 12 | { 13 | printf(" 1 | Pointed value: %d\n", *ptr); 14 | } 15 | 16 | int someValue = 123; 17 | 18 | /* Execute only if ptr is null */ 19 | if (!ptr) //if (ptr == NULL) 20 | { 21 | ptr = &someValue; 22 | } 23 | 24 | /* Execute only if ptr isn't null */ 25 | if (ptr) //if (ptr != NULL) 26 | { 27 | printf(" 2 | Pointed value: %d\n", *ptr); 28 | } 29 | 30 | printf("\n\n=== ByteGarage ===\n\n"); 31 | return EXIT_SUCCESS; 32 | } 33 | -------------------------------------------------------------------------------- /Examples/S15_L05_ConditionalCompilation/example.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #define LOG_INFO 5 | // #define BUFFER_SIZE 1024 6 | 7 | int main() 8 | { 9 | printf("\n=== Conditional Compilation ===\n\n"); 10 | 11 | #ifdef SOME_MACRO 12 | printf("SOME_MACRO exists\n"); 13 | #endif 14 | 15 | #ifdef LOG_INFO 16 | printf("This is an INFO!\n"); 17 | #else 18 | printf("I shouldn't log anything!\n"); 19 | #endif 20 | 21 | #if defined BUFFER_SIZE && BUFFER_SIZE > 2048 22 | printf("The buffer is huge, do something!\n"); 23 | #elif defined BUFFER_SIZE 24 | printf("The buffer is ok\n"); 25 | #else 26 | printf("You forgot to define BUFFER_SIZE!\n"); 27 | #endif 28 | 29 | printf("\n\n=== ByteGarage ===\n\n"); 30 | return EXIT_SUCCESS; 31 | } 32 | -------------------------------------------------------------------------------- /Examples/S04_L04_Integers/example_1.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int main() 6 | { 7 | unsigned students = 25U; 8 | unsigned long long worldPopulation = 7801235945ULL; 9 | 10 | printf("%12u | Students in the class\n", students); 11 | printf("%12llu | World population now\n", worldPopulation); 12 | 13 | uint8_t count = UINT8_MAX; 14 | printf("%12u | Count of something\n", count); 15 | 16 | count = count + 1; 17 | printf("%12u | Count of something + 1 (OVERFLOW)\n", count); 18 | 19 | printf("%12d | INT32_MIN\n", INT32_MIN); 20 | printf("%12d | INT32_MAX\n", INT32_MAX); 21 | printf("%12u | UINT32_MAX\n", UINT32_MAX); 22 | 23 | printf("\n\n=== ByteGarage ===\n\n"); 24 | return EXIT_SUCCESS; 25 | } 26 | -------------------------------------------------------------------------------- /Examples/S10_L05_FindTheSizeOfAnArray/example.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int main() 6 | { 7 | printf("\n=== Find the Size of an Array ===\n\n"); 8 | 9 | int x[] = {1, 2, 3, 4, 5}; 10 | printf("sizeof(x): %llu\n", sizeof(x)); 11 | printf("sizeof(x[0]): %llu\n", sizeof(x[0])); 12 | printf("sizeof(int): %llu\n", sizeof(int)); 13 | printf("array length: %llu\n\n", sizeof(x) / sizeof(x[0])); 14 | 15 | int8_t y[] = {1, 2, 3, 4, 5}; 16 | printf("sizeof(y): %llu\n", sizeof(y)); 17 | printf("sizeof(y[0]): %llu\n", sizeof(y[0])); 18 | printf("sizeof(int8_t): %llu\n", sizeof(int8_t)); 19 | printf("array length: %llu\n", sizeof(y) / sizeof(y[0])); 20 | 21 | printf("\n\n=== ByteGarage ===\n\n"); 22 | return EXIT_SUCCESS; 23 | } 24 | -------------------------------------------------------------------------------- /Examples/S05_L06_BitwiseOperators/example_1.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | /** 6 | * type: uint8_t 7 | * 8 | * A = 12 ---> 0000 1100 9 | * B = 5 ---> 0000 0101 10 | * 11 | * A & B ---> 0000 0100 = 4 12 | * A | B ---> 0000 1101 = 13 13 | * A ^ B ---> 0000 1001 = 9 14 | * A << 1 ---> 0001 1000 = 24 15 | * A >> 1 ---> 0000 0110 = 6 16 | * 17 | */ 18 | 19 | int main() 20 | { 21 | uint8_t a = 12; 22 | uint8_t b = 5; 23 | 24 | printf("A = %u\n", a); 25 | printf("B = %u\n", b); 26 | printf("\n"); 27 | 28 | printf("A & B = %u\n", a & b); 29 | printf("A | B = %u\n", a | b); 30 | printf("A ^ B = %u\n", a ^ b); 31 | 32 | printf("A << 1 = %u\n", a << 1U); 33 | printf("A >> 1 = %u\n", a >> 1U); 34 | 35 | printf("\n\n=== ByteGarage ===\n\n"); 36 | return EXIT_SUCCESS; 37 | } 38 | -------------------------------------------------------------------------------- /Examples/S10_L09_VariableLengthArrays/example.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #define LEN 5 5 | 6 | void array_maker(int len) 7 | { 8 | int vla[len]; 9 | 10 | for (int i = 0; i < len; i++) 11 | { 12 | vla[i] = i; 13 | } 14 | for (int i = 0; i < len; i++) 15 | { 16 | printf("%d ", vla[i]); 17 | } 18 | } 19 | 20 | int main() 21 | { 22 | printf("\n=== Variable Length Arrays ===\n\n"); 23 | 24 | int x[LEN] = {1, 2, 3}; 25 | 26 | for (int i = 0; i < LEN; i++) 27 | { 28 | printf("%d ", x[i]); 29 | } 30 | 31 | while (1) 32 | { 33 | int len; 34 | printf("\nEnter the len: "); 35 | scanf("%d", &len); 36 | 37 | if (len < 1) 38 | { 39 | break; 40 | } 41 | array_maker(len); 42 | } 43 | 44 | printf("\n\n=== ByteGarage ===\n\n"); 45 | return EXIT_SUCCESS; 46 | } 47 | -------------------------------------------------------------------------------- /Examples/S05_L05_LogicalOperators/example_1.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int main() 6 | { 7 | bool x, y; 8 | 9 | printf("Truth Table\n"); 10 | printf("------------------------------------\n"); 11 | printf("| x | y | x AND y | x OR y | NOT x |\n"); 12 | printf("------------------------------------\n"); 13 | 14 | x = 0; 15 | y = 0; 16 | printf("| %d | %d |%5d |%5d |%4d |\n",x, y, x && y, x || y, !x); 17 | 18 | x = 1; 19 | y = 0; 20 | printf("| %d | %d |%5d |%5d |%4d |\n",x, y, x && y, x || y, !x); 21 | 22 | x = 0; 23 | y = 1; 24 | printf("| %d | %d |%5d |%5d |%4d |\n",x, y, x && y, x || y, !x); 25 | 26 | x = 1; 27 | y = 1; 28 | printf("| %d | %d |%5d |%5d |%4d |\n",x, y, x && y, x || y, !x); 29 | 30 | printf("------------------------------------\n"); 31 | 32 | printf("\n\n=== ByteGarage ===\n\n"); 33 | return EXIT_SUCCESS; 34 | } 35 | -------------------------------------------------------------------------------- /Examples/S04_L05_FloatingPoints/example_1.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | /* 1.23456789 */ 7 | double decimalDigits = 1.23456789; 8 | 9 | /* 7.801 x 10^9 */ 10 | double worldPopulation = 7.801E9; 11 | 12 | /* 6.626 x 10^-34 */ 13 | double plankConstant = 6.626E-34; 14 | 15 | printf("%12.1f | 1 decimal digit\n", decimalDigits); 16 | printf("%12.3f | 3 decimal digit\n", decimalDigits); 17 | printf("%12.1f | worldPopulation, decimal, 1 digit of precision\n", worldPopulation); 18 | printf("%12.1e | worldPopulation, scientific, 1 digit of precision\n", worldPopulation); 19 | printf("%12.3e | worldPopulation, scientific, 3 digits of precision\n", worldPopulation); 20 | printf("%12.1E | plankConstant, scientific, 1 digit of precision\n", plankConstant); 21 | printf("%12.3E | plankConstant, scientific, 3 digits of precision\n", plankConstant); 22 | 23 | printf("\n\n=== ByteGarage ===\n\n"); 24 | return EXIT_SUCCESS; 25 | } 26 | -------------------------------------------------------------------------------- /Examples/S08_L04_CommonMistakesInAction/example.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | // double average(double a, double b) 5 | // { 6 | // return (a + b) / 2; 7 | // } 8 | 9 | double average(double a, double b); 10 | 11 | int main() 12 | { 13 | int num = 12; 14 | 15 | if (num < 0) 16 | { 17 | printf("num is < 0\n"); 18 | } 19 | 20 | if (num == 5) 21 | { 22 | printf("num is equal to 5\n"); 23 | } 24 | 25 | for (int i = 0; i <= num; i++) 26 | { 27 | printf("%d\n", i); 28 | } 29 | printf("\n"); 30 | 31 | double a = 1, b = 2, c = 3; 32 | // double avg = average(average(a, b), c); //Nope! 33 | double avg = (a + b + c) / 3; 34 | 35 | printf("average(%.1f, %.1f, %.1f) = %.1f\n", a, b, c, avg); 36 | 37 | printf("average(%.1f, %.1f) = %.1f\n", a, b, average(a, b)); 38 | 39 | printf("\n\n=== ByteGarage ===\n\n"); 40 | return EXIT_SUCCESS; 41 | } 42 | 43 | double average(double a, double b) 44 | { 45 | return (a + b) / 2; 46 | } 47 | -------------------------------------------------------------------------------- /Challenges/S06_Challenge_MinimumPowerOf2/minimum_power_of_2.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | /** 5 | * === Minimum Power Of 2 === 6 | * 7 | * Goals: 8 | * - Acquire user input as int 9 | * - If input is positive: 10 | * > print the smallest power of 2 grater than or equal to the number 11 | * - If input is negative: 12 | * > do nothing 13 | * - Repeat until user enter -1 14 | */ 15 | 16 | int main() 17 | { 18 | int userInput, result; 19 | 20 | do 21 | { 22 | printf("Enter an integer number (-1 to exit): "); 23 | scanf("%d", &userInput); 24 | 25 | if (userInput > 0) 26 | { 27 | result = 1; 28 | while (result < userInput) 29 | { 30 | result *= 2; //same as: result <<= 1; 31 | } 32 | printf("Minimum power of 2 greater than %d: %d\n", userInput, result); 33 | } 34 | 35 | } while (userInput != -1); 36 | 37 | printf("\n\n=== ByteGarage ===\n\n"); 38 | return EXIT_SUCCESS; 39 | } 40 | -------------------------------------------------------------------------------- /Examples/S11_L12_PracticeWithNumericConversion/example.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | int main() 7 | { 8 | printf("\n=== Practice With Numeric Conversion ===\n\n"); 9 | 10 | char str[] = "123 0XFF"; 11 | char *pend, *pstart = str; 12 | 13 | while (true) 14 | { 15 | long num = strtol(pstart, &pend, 0); 16 | 17 | printf("\nConverting: %s\n", pstart); 18 | printf("errno: %d %s\n", errno, errno == ERANGE ? "(ERANGE)" : ""); 19 | printf("%s\n", pend == pstart ? "pend == pstart (ERR)" : "pend != pstart (OK)"); 20 | if (errno || pend == pstart) 21 | { 22 | printf("Conversion error!\n"); 23 | } 24 | else 25 | { 26 | printf("Conversion: %ld\n", num); 27 | } 28 | 29 | if (pend == pstart) 30 | { 31 | break; 32 | } 33 | 34 | pstart = pend; 35 | } 36 | 37 | printf("\n\n=== ByteGarage ===\n\n"); 38 | return EXIT_SUCCESS; 39 | } 40 | -------------------------------------------------------------------------------- /Template/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S04_L08_Enum/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S04_L04_Integers/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S04_L07_Booleans/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S04_L09_Typedef/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S13_L05_BitFields/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Challenges/S05_Challenge_Sphere/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S04_L05_FloatingPoints/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S04_L06_Characters/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S05_L10_SizeofOperator/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S09_L05_NullPointers/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S14_L02_HowToUseUnions/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Challenges/S05_Challenge_BitSelector/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Challenges/S06_Challenge_EvenOdd/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Challenges/S06_Challenge_WeekDays/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Challenges/S11_Challenge_GetTheLine/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Challenges/S11_Challenge_MoveTheRook/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S03_L05_WorkingWithVSCode/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S05_L02_ArithmeticOperators/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S05_L04_RelationalOperators/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S05_L05_LogicalOperators/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S05_L06_BitwiseOperators/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S05_L09_AssignmentOperators/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S06_L02_IfElseStatement/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S06_L05_SwitchStatement/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S06_L14_BreakAndContinue/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S08_L03_DebuggingInVSCode/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S10_L02_WorkingWithArrays/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S10_L04_InitializingArrays/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S10_L06_PointersAndArrays/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S10_L07_PointersArithmetic/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S13_L02_StructuringData/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S13_L06_ArraysOfStructures/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S15_L04_FunctionLikeMacros/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S15_L04_FunctionLikeMacros/example.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #define ARRAY_LEN 100 5 | #define CALC_ARRAY_LEN(x) (sizeof((x)) / sizeof((x)[0])) 6 | #define MAX(a, b) ((a) > (b) ? (a) : (b)) 7 | 8 | int main() 9 | { 10 | printf("\n=== Function Like Macros ===\n\n"); 11 | 12 | double array[ARRAY_LEN]; 13 | 14 | printf("Array length: %d\n", ARRAY_LEN); 15 | 16 | #undef ARRAY_LEN 17 | #define ARRAY_LEN 999 18 | 19 | printf("New array len: %d\n", ARRAY_LEN); 20 | 21 | printf("Source file: \"%s\", %d\n", __FILE__, __LINE__); 22 | printf("Compilation time: %s\n", __TIME__); 23 | 24 | int array_len = CALC_ARRAY_LEN(array); 25 | printf("Calculated array len: %d\n", array_len); 26 | 27 | int a = -1, b = 5; 28 | printf("MAX(%d, %d): %d\n", a, b, MAX(a, b)); 29 | int b_before = b; 30 | printf("MAX(%d, %d): %d\n", a, b_before, MAX(a, b++)); 31 | printf("b before increment: %d\n", b_before); 32 | printf("b after increment: %d\n", b); 33 | 34 | printf("\n\n=== ByteGarage ===\n\n"); 35 | return EXIT_SUCCESS; 36 | } 37 | -------------------------------------------------------------------------------- /Examples/S17_L03_BuildYourProject/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Challenges/S04_Challenge_BunchOfConstants/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Challenges/S04_Challenge_SpaceshipThrust/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Challenges/S06_Challenge_MinimumPowerOf2/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Challenges/S06_Challenge_PrimeNumbers/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Challenges/S06_Challenge_SigmaDrawing/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Challenges/S09_Challenge_SimpleSwapper/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Challenges/S10_Challenge_RandomMatrix/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S08_L04_CommonMistakesInAction/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S09_L04_PracticeWithPointers/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S09_L07_FunctionsAndPointers/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S10_L05_FindTheSizeOfAnArray/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S10_L08_MultidimensionalArrays/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S10_L09_VariableLengthArrays/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S11_L04_StringLengthCopyCompare/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S13_L04_InitializingStructures/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S13_L07_PointersToStructures/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S13_L08_StructuresAndFunctions/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S13_L10_FlexibleArrayMembers/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S15_L05_ConditionalCompilation/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S16_L07_LetsPracticeWithFileIO/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Challenges/S06_Challenge_EvenOdd/even_odd.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | /** 6 | * === Even Odd === 7 | * 8 | * Goals: 9 | * - prompt user to enter a positive integer number 10 | * - if number is negative print a warning and exit 11 | * - check if number is even or odd and store the result 12 | * in a boolean variable using the ternary operator 13 | * - print whether the number is even or odd 14 | * 15 | */ 16 | 17 | int main() 18 | { 19 | int userInput; 20 | printf("Enter a positive integer number: "); 21 | scanf("%d", &userInput); 22 | 23 | if (userInput < 0) 24 | { 25 | printf("Warning: %d is negative.\n", userInput); 26 | return EXIT_SUCCESS; 27 | } 28 | 29 | bool isEven = (userInput % 2 == 0) ? true : false; 30 | 31 | if (isEven) 32 | { 33 | printf("The number %d is even.\n", userInput); 34 | } 35 | else 36 | { 37 | printf("The number %d is odd.\n", userInput); 38 | } 39 | 40 | printf("\n\n=== ByteGarage ===\n\n"); 41 | return EXIT_SUCCESS; 42 | } 43 | -------------------------------------------------------------------------------- /Challenges/S06_Challenge_PlanetaryAlignment/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Challenges/S07_Challenge_PrimeNumbersImproved/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Challenges/S09_Challenge_FloatDecomposition/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Challenges/S12_Challenge_GetTheLineDynamically/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S05_L03_IncrementDecrementOperators/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S08_L05_CommonMistakesInActionTake2/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S10_L03_DefiningAndAccessingArrays/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S11_L12_PracticeWithNumericConversion/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S13_L09_PointersVersusArraysMembers/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Challenges/S13_Challenge_WorkoutsHeartRateMonitor/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S11_L07_StringSearchingAndTokenization/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Examples/S13_L03_DefiningAndAccessingStructures/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Challenges/S10_Challenge_PrimeNumbersFurtherImproved/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "cStandard": "c11", 10 | "cppStandard": "gnu++14", 11 | "intelliSenseMode": "gcc-x64" 12 | }, 13 | { 14 | "name": "Win32", 15 | "includePath": [ 16 | "${workspaceFolder}/**" 17 | ], 18 | "defines": [ 19 | "_DEBUG", 20 | "UNICODE", 21 | "_UNICODE" 22 | ], 23 | "cStandard": "c11", 24 | "cppStandard": "gnu++14", 25 | "intelliSenseMode": "gcc-x64" 26 | }, 27 | { 28 | "name": "Mac", 29 | "includePath": ["${workspaceFolder}/**"], 30 | "defines": [], 31 | "cStandard": "c11", 32 | "intelliSenseMode": "clang-x64" 33 | } 34 | ], 35 | "version": 4 36 | } -------------------------------------------------------------------------------- /Challenges/S09_Challenge_SimpleSwapper/simple_swapper.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | /** 5 | * === Simple Swapper === 6 | * 7 | * Build a program that exchanges two integer values 8 | * 9 | * Goals: 10 | * - Implement the swap operation inside a function 11 | * - The swap function must exchange the value of two int variables declared in main 12 | * 13 | * Tips: 14 | * - Use pointers! 15 | * - Think carefully about the const keyword 16 | */ 17 | 18 | void swap(int *const p1, int *const p2) 19 | { 20 | int temp; 21 | 22 | temp = *p2; 23 | *p2 = *p1; 24 | *p1 = temp; 25 | } 26 | 27 | int main() 28 | { 29 | int apples = 12; 30 | int pears = 34; 31 | 32 | printf("Before swapping: apples = %d, pears = %d\n", apples, pears); 33 | 34 | int *papples = &apples; 35 | int *ppears = &pears; 36 | 37 | swap(papples, ppears); 38 | 39 | printf("After swapping: apples = %d, pears = %d\n", apples, pears); 40 | 41 | swap(&apples, &pears); 42 | 43 | printf("After second swapping: apples = %d, pears = %d\n", apples, pears); 44 | 45 | printf("\n\n=== ByteGarage ===\n\n"); 46 | return EXIT_SUCCESS; 47 | } 48 | -------------------------------------------------------------------------------- /Examples/S06_L05_SwitchStatement/example_1.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | char operator; 7 | double operand_a, operand_b, result; 8 | int error = 0; 9 | 10 | printf("Enter the operator: "); 11 | scanf("%c", &operator); 12 | printf("Enter first operand: "); 13 | scanf("%lf", &operand_a); 14 | printf("Enter second operand: "); 15 | scanf("%lf", &operand_b); 16 | printf("\n"); 17 | 18 | switch (operator) 19 | { 20 | case '+': 21 | result = operand_a + operand_b; 22 | break; 23 | case '-': 24 | result = operand_a - operand_b; 25 | break; 26 | case '*': 27 | result = operand_a * operand_b; 28 | break; 29 | case '/': 30 | result = operand_a / operand_b; 31 | break; 32 | default: 33 | error = 1; 34 | break; 35 | } 36 | 37 | if (error) 38 | { 39 | printf("Error: unknown operator\n"); 40 | } 41 | else 42 | { 43 | printf("%.1f %c %.1f = %.1f\n", operand_a, operator, operand_b, result); 44 | } 45 | 46 | printf("\n\n=== ByteGarage ===\n\n"); 47 | return EXIT_SUCCESS; 48 | } 49 | -------------------------------------------------------------------------------- /Examples/S10_L04_InitializingArrays/example.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #define LEN 5 // we cannot use variable or constants with brace-initialization 5 | 6 | int main() 7 | { 8 | printf("\n=== Initializing Arrays ===\n\n"); 9 | 10 | int a[LEN]; // a has type int[5] and contains unpredictable values! 11 | 12 | /* Before moving on we need a to contain all 1s */ 13 | for (int i = 0; i < LEN; i++) 14 | { 15 | a[i] = 1; 16 | } 17 | 18 | /* Array initialization from brace-enclosed lists */ 19 | int x[] = {1, 2, 3, 4, 5}; // x has type int[5] and holds 1, 2, 3, 4, 5 20 | int y[LEN] = {1, 2, 3}; // y has type int[5] and holds 1, 2, 3, 0, 0 21 | int z[LEN] = {0}; // z has type int[5] and holds 0, 0, 0, 0, 0 22 | 23 | /* Array initialization with designators (sparse array) */ 24 | int w[LEN] = {[1] = 1, [3] = 1}; // w has type int[5] and holds 0, 1, 0, 1, 0 25 | int q[LEN] = {[1] = 3, [LEN - 1] = 5}; // q has type int[5] and holds 0, 3, 0, 0, 5 26 | int t[10] = {[0] = 5, 4, [LEN - 3] = 3, 2, 1}; // t has type int[10] and holds 5, 4, 0, 0, ..., 3, 2, 1 27 | 28 | printf("\n\n=== ByteGarage ===\n\n"); 29 | return EXIT_SUCCESS; 30 | } 31 | -------------------------------------------------------------------------------- /Challenges/S05_Challenge_Sphere/sphere.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | /** 5 | * === Sphere === 6 | * 7 | * Calculate surface and volume of a sphere 8 | * 9 | * Goals: 10 | * - prompt user to enter the radius 11 | * - calculate the surface area 12 | * - calculate the enclosed volume 13 | * - print the radius and the results in decimal format (2 digit of precision) 14 | * - print the radius and the results in scientific notation (3 digits of precision) 15 | * - check the results 16 | */ 17 | 18 | int main() 19 | { 20 | const double pi = 3.14159265359; 21 | double r; 22 | 23 | printf("Enter the radius of a sphere: "); 24 | scanf("%lf", &r); 25 | printf("\n"); 26 | 27 | double surface = 4 * pi * r * r; 28 | double volume = 4.0 / 3 * pi * r * r * r; 29 | 30 | printf("DECIMAL\n"); 31 | printf("radius: %.2f\n", r); 32 | printf("surface: %.2f\n", surface); 33 | printf("volume: %.2f\n", volume); 34 | printf("\n"); 35 | 36 | printf("SCIENTIFIC\n"); 37 | printf("radius: %.3e\n", r); 38 | printf("surface: %.3e\n", surface); 39 | printf("volume: %.3e\n", volume); 40 | printf("\n"); 41 | 42 | printf("\n\n=== ByteGarage ===\n\n"); 43 | return EXIT_SUCCESS; 44 | } 45 | -------------------------------------------------------------------------------- /Examples/S13_L09_PointersVersusArraysMembers/example.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #define MAX_DIMENSIONS 3 7 | 8 | typedef struct GuyP 9 | { 10 | char *name; 11 | char *job; 12 | bool active; 13 | int dimensions; 14 | double pos[MAX_DIMENSIONS]; 15 | } GuyP; 16 | 17 | typedef struct GuyA 18 | { 19 | char *name; 20 | char job[64]; 21 | bool active; 22 | int dimensions; 23 | double pos[MAX_DIMENSIONS]; 24 | } GuyA; 25 | 26 | int main() 27 | { 28 | printf("\n=== Pointers Versus Arrays Members ===\n\n"); 29 | 30 | printf("Sizeof(GuyP): %lld\n", sizeof(GuyP)); 31 | printf("Sizeof(GuyA): %lld\n", sizeof(GuyA)); 32 | 33 | GuyP billP = { 34 | .name = "Bill Gates", 35 | .job = "I make software...", 36 | .active = true, 37 | }; 38 | 39 | billP.job = "I founded Microsoft!"; 40 | 41 | GuyA billA = { 42 | .name = "Bill Gates", 43 | .job = "I make software...", 44 | .active = true, 45 | }; 46 | 47 | // billA.job = "I founded Microsoft!"; // wrong! 48 | strncpy(billA.job, "I founded Microsoft!", sizeof(billA.job) - 1); 49 | 50 | printf("\n\n=== ByteGarage ===\n\n"); 51 | return EXIT_SUCCESS; 52 | } -------------------------------------------------------------------------------- /Challenges/S06_Challenge_SigmaDrawing/sigma_drawing.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | /** 5 | * === Sigma Drawing === 6 | * 7 | * Print this drawing: 8 | * 9 | * xxxxxxxxxx 10 | * x 11 | * x 12 | * x 13 | * x 14 | * x 15 | * x 16 | * x 17 | * x 18 | * x 19 | * xxxxxxxxxx 20 | * 21 | * 22 | * Base width: 10 23 | * Tip width: 5 24 | * Total height: 11 25 | * 26 | */ 27 | 28 | int main() 29 | { 30 | const char border = 'x'; 31 | const int BASE_WIDTH = 10; 32 | const int TIP_WIDTH = 5; 33 | 34 | for (int i = 0; i < BASE_WIDTH; i++) 35 | { 36 | printf("%c", border); 37 | } 38 | 39 | printf("\n"); 40 | 41 | for (int i = 1; i < TIP_WIDTH; i++) 42 | { 43 | for (int j = 0; j < i; j++) 44 | { 45 | printf(" "); 46 | } 47 | printf("%c\n", border); 48 | } 49 | 50 | for (int i = TIP_WIDTH; i > 0; i--) 51 | { 52 | for (int j = 0; j < i; j++) 53 | { 54 | printf(" "); 55 | } 56 | printf("%c\n", border); 57 | } 58 | 59 | for (int i = 0; i < BASE_WIDTH; i++) 60 | { 61 | printf("%c", border); 62 | } 63 | 64 | printf("\n\n=== ByteGarage ===\n\n"); 65 | return EXIT_SUCCESS; 66 | } 67 | --------------------------------------------------------------------------------