Skip to content

Commit

Permalink
daily upload 12.21
Browse files Browse the repository at this point in the history
  • Loading branch information
TGSpock123 committed Dec 22, 2023
1 parent 16c8512 commit 4c3665f
Show file tree
Hide file tree
Showing 15 changed files with 69 additions and 17 deletions.
2 changes: 1 addition & 1 deletion 10_plus/10.23.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ int main (void)
int ref[] = {8, 4, 0, 2};
int *ptr;
int index;

printf ("%d\n", *++ref);
for (index = 0; index < 4; index ++, ptr ++)
{
Expand Down
Binary file renamed 10_plus/.10.25.c.swp → 10_plus/10.25
100644 → 100755
Binary file not shown.
46 changes: 46 additions & 0 deletions 10_plus/10.25.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#include <stdio.h>
void copy_arr (double ar[], const double m[], int n);
void copy_ptr (double * str, const double * q, int n);
void copy_ptrs (double ar[], const double * m, const double * p);
int main (void)
{
int n;
double source[5] = {1.1, 2.2, 3.3, 4.4, 5.5};
double target[5];
double target2[5];
double target3[5];

copy_arr (target, source, 5);
copy_ptr (target2, source, 5);
copy_ptrs (target3, source, source + 5);
for (n = 0; n < 5; n ++)
{
printf ("source[%d] = %g, target[%d] = %g, target2[%d] = %g, target3[%d] = %g\n", n, source[n], n,
target[n], n, target2[n], n, target3[n]);
}

return 0;
}
void copy_arr (double ar[], const double m[], int n)
{
for (int i = 0; i < n; i ++)
{
ar[i] = m[i];
}
}
void copy_ptr (double * str, const double * q, int n)
{
for (int i = 0; i < n; i ++)
{
*str = *q;
str ++;
q ++;
}
}
void copy_ptrs (double ar[], const double * m, const double * p)
{
for (; m < p; m ++, ar ++)
{
*ar = *m;
}
}
5 changes: 5 additions & 0 deletions 11/11.1.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include <stdio.h>
int main (void)
{
return 0;
}
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ set(CMAKE_CXX_STANDARD 14)
include_directories(9)

add_executable(C_primer
10_plus/10.23.c
10_plus/10.25.c
)
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
{
"directoryIndex" : 0,
"id" : "C_primer::@6890427a1f51a3e7e1df",
"jsonFile" : "target-C_primer-Debug-4ba02d12a23351dc7203.json",
"jsonFile" : "target-C_primer-Debug-140e8c03379a55810a79.json",
"name" : "C_primer",
"projectIndex" : 0
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"objects" :
[
{
"jsonFile" : "codemodel-v2-8cc01aa64a5d769a8dbe.json",
"jsonFile" : "codemodel-v2-bef5b4b243c56b7be4be.json",
"kind" : "codemodel",
"version" :
{
Expand Down Expand Up @@ -86,7 +86,7 @@
},
"codemodel-v2" :
{
"jsonFile" : "codemodel-v2-8cc01aa64a5d769a8dbe.json",
"jsonFile" : "codemodel-v2-bef5b4b243c56b7be4be.json",
"kind" : "codemodel",
"version" :
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
{
"backtrace" : 1,
"compileGroupIndex" : 0,
"path" : "10_plus/10.23.c",
"path" : "10_plus/10.25.c",
"sourceGroupIndex" : 0
}
],
Expand Down
Binary file modified cmake-build-debug/.ninja_deps
Binary file not shown.
11 changes: 6 additions & 5 deletions cmake-build-debug/.ninja_log
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# ninja log v5
433 1450 1702958014858365474 C_primer d7434207347cad4d
127 324 1703162059321104859 C_primer 3d9b417299e9a684
4 335 1702822896367170007 CMakeFiles/C_primer.dir/9_plus/9_plus/9.36.c.o 9f95dd8b31879556
1 144 1702825381558358062 CMakeFiles/C_primer.dir/10_plus/10.14.c.o 27c11ea85739635
0 267 1702717481449984888 CMakeFiles/C_primer.dir/10_plus/10.12.c.o d0b2887c66daa4b1
0 431 1702958013825178426 CMakeFiles/C_primer.dir/10_plus/10.15.c.o 3cd52d55636f54b
0 305 1702822896335875576 CMakeFiles/C_primer.dir/9_plus/9_plus/9.35.c.o c09ce47479a5514a
1 138 1702825381555261318 CMakeFiles/C_primer.dir/10_plus/10.13.c.o 7bef308e0e43b8ac
0 399 1703062779349976926 CMakeFiles/C_primer.dir/10_plus/10.23.c.o 4a833a773a8f433a
403 1098 1703062780055927389 C_primer 81b0a4dcc53c9b5b
1 268 1703062788743730179 CMakeFiles/C_primer.dir/10_plus/10.23.c.o 4a833a773a8f433a
268 702 1703062789201748673 C_primer 81b0a4dcc53c9b5b
5 125 1703162059120010468 CMakeFiles/C_primer.dir/10_plus/10.25.c.o df8f1239080514a
1 835 1703211439493572028 CMakeFiles/C_primer.dir/10_plus/10.25.c.o df8f1239080514a
836 1468 1703211440131161055 C_primer 3d9b417299e9a684
2 620 1703211568893536340 CMakeFiles/C_primer.dir/10_plus/10.25.c.o df8f1239080514a
621 729 1703211569006352175 C_primer 3d9b417299e9a684
Binary file not shown.
2 changes: 1 addition & 1 deletion cmake-build-debug/CMakeFiles/clion-Debug-log.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/Applications/CLion.app/Contents/bin/cmake/mac/x64/bin/cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=/Applications/CLion.app/Contents/bin/ninja/mac/x64/ninja -G Ninja -S /Users/tgspock/Documents/GitHub/learn_c_primer.github.io -B /Users/tgspock/Documents/GitHub/learn_c_primer.github.io/cmake-build-debug
-- Configuring done (0.3s)
-- Configuring done (0.1s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/tgspock/Documents/GitHub/learn_c_primer.github.io/cmake-build-debug
Binary file modified cmake-build-debug/C_primer
Binary file not shown.
4 changes: 2 additions & 2 deletions cmake-build-debug/Testing/Temporary/LastTest.log
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Start testing: Dec 20 16:59 CST
Start testing: Dec 22 10:19 CST
----------------------------------------------------------
End testing: Dec 20 16:59 CST
End testing: Dec 22 10:19 CST
6 changes: 3 additions & 3 deletions cmake-build-debug/build.ninja
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ cmake_ninja_workdir = /Users/tgspock/Documents/GitHub/learn_c_primer.github.io/c

build cmake_object_order_depends_target_C_primer: phony || CMakeFiles/C_primer.dir

build CMakeFiles/C_primer.dir/10_plus/10.23.c.o: C_COMPILER__C_primer_unscanned_Debug /Users/tgspock/Documents/GitHub/learn_c_primer.github.io/10_plus/10.23.c || cmake_object_order_depends_target_C_primer
DEP_FILE = CMakeFiles/C_primer.dir/10_plus/10.23.c.o.d
build CMakeFiles/C_primer.dir/10_plus/10.25.c.o: C_COMPILER__C_primer_unscanned_Debug /Users/tgspock/Documents/GitHub/learn_c_primer.github.io/10_plus/10.25.c || cmake_object_order_depends_target_C_primer
DEP_FILE = CMakeFiles/C_primer.dir/10_plus/10.25.c.o.d
FLAGS = -g -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -mmacosx-version-min=12.7 -fcolor-diagnostics
INCLUDES = -I/Users/tgspock/Documents/GitHub/learn_c_primer.github.io/9
OBJECT_DIR = CMakeFiles/C_primer.dir
Expand All @@ -64,7 +64,7 @@ build CMakeFiles/C_primer.dir/10_plus/10.23.c.o: C_COMPILER__C_primer_unscanned_
#############################################
# Link the executable C_primer

build C_primer: C_EXECUTABLE_LINKER__C_primer_Debug CMakeFiles/C_primer.dir/10_plus/10.23.c.o
build C_primer: C_EXECUTABLE_LINKER__C_primer_Debug CMakeFiles/C_primer.dir/10_plus/10.25.c.o
FLAGS = -g -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk -mmacosx-version-min=12.7
OBJECT_DIR = CMakeFiles/C_primer.dir
POST_BUILD = :
Expand Down

0 comments on commit 4c3665f

Please sign in to comment.