Skip to content

Commit d30fbd1

Browse files
committed
Code Changes
Code Changes
1 parent 2374dd6 commit d30fbd1

File tree

13 files changed

+277
-186
lines changed

13 files changed

+277
-186
lines changed

.cproject

Lines changed: 0 additions & 114 deletions
This file was deleted.

.dep.inc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# This code depends on make tool being used
2+
DEPFILES=$(wildcard $(addsuffix .d, ${OBJECTFILES} ${TESTOBJECTFILES}))
3+
ifneq (${DEPFILES},)
4+
include ${DEPFILES}
5+
endif

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/Debug/
2+
/nbproject/
3+
/dist/
4+
/build/
5+
/.gitignore/

.project

Lines changed: 0 additions & 27 deletions
This file was deleted.

.settings/language.settings.xml

Lines changed: 0 additions & 25 deletions
This file was deleted.

Makefile

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
#
2+
# There exist several targets which are by default empty and which can be
3+
# used for execution of your targets. These targets are usually executed
4+
# before and after some main targets. They are:
5+
#
6+
# .build-pre: called before 'build' target
7+
# .build-post: called after 'build' target
8+
# .clean-pre: called before 'clean' target
9+
# .clean-post: called after 'clean' target
10+
# .clobber-pre: called before 'clobber' target
11+
# .clobber-post: called after 'clobber' target
12+
# .all-pre: called before 'all' target
13+
# .all-post: called after 'all' target
14+
# .help-pre: called before 'help' target
15+
# .help-post: called after 'help' target
16+
#
17+
# Targets beginning with '.' are not intended to be called on their own.
18+
#
19+
# Main targets can be executed directly, and they are:
20+
#
21+
# build build a specific configuration
22+
# clean remove built files from a configuration
23+
# clobber remove all built files
24+
# all build all configurations
25+
# help print help mesage
26+
#
27+
# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
28+
# .help-impl are implemented in nbproject/makefile-impl.mk.
29+
#
30+
# Available make variables:
31+
#
32+
# CND_BASEDIR base directory for relative paths
33+
# CND_DISTDIR default top distribution directory (build artifacts)
34+
# CND_BUILDDIR default top build directory (object files, ...)
35+
# CONF name of current configuration
36+
# CND_PLATFORM_${CONF} platform name (current configuration)
37+
# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration)
38+
# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration)
39+
# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration)
40+
# CND_PACKAGE_DIR_${CONF} directory of package (current configuration)
41+
# CND_PACKAGE_NAME_${CONF} name of package (current configuration)
42+
# CND_PACKAGE_PATH_${CONF} path to package (current configuration)
43+
#
44+
# NOCDDL
45+
46+
47+
# Environment
48+
MKDIR=mkdir
49+
CP=cp
50+
CCADMIN=CCadmin
51+
52+
53+
# build
54+
build: .build-post
55+
56+
.build-pre:
57+
# Add your pre 'build' code here...
58+
59+
.build-post: .build-impl
60+
# Add your post 'build' code here...
61+
62+
63+
# clean
64+
clean: .clean-post
65+
66+
.clean-pre:
67+
# Add your pre 'clean' code here...
68+
69+
.clean-post: .clean-impl
70+
# Add your post 'clean' code here...
71+
72+
73+
# clobber
74+
clobber: .clobber-post
75+
76+
.clobber-pre:
77+
# Add your pre 'clobber' code here...
78+
79+
.clobber-post: .clobber-impl
80+
# Add your post 'clobber' code here...
81+
82+
83+
# all
84+
all: .all-post
85+
86+
.all-pre:
87+
# Add your pre 'all' code here...
88+
89+
.all-post: .all-impl
90+
# Add your post 'all' code here...
91+
92+
93+
# build tests
94+
build-tests: .build-tests-post
95+
96+
.build-tests-pre:
97+
# Add your pre 'build-tests' code here...
98+
99+
.build-tests-post: .build-tests-impl
100+
# Add your post 'build-tests' code here...
101+
102+
103+
# run tests
104+
test: .test-post
105+
106+
.test-pre: build-tests
107+
# Add your pre 'test' code here...
108+
109+
.test-post: .test-impl
110+
# Add your post 'test' code here...
111+
112+
113+
# help
114+
help: .help-post
115+
116+
.help-pre:
117+
# Add your pre 'help' code here...
118+
119+
.help-post: .help-impl
120+
# Add your post 'help' code here...
121+
122+
123+
124+
# include project implementation makefile
125+
include nbproject/Makefile-impl.mk
126+
127+
# include project make variables
128+
include nbproject/Makefile-variables.mk

main.c

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* To change this license header, choose License Headers in Project Properties.
3+
* To change this template file, choose Tools | Templates
4+
* and open the template in the editor.
5+
*/
6+
7+
/*
8+
* File: main.c
9+
* Author: narkarum
10+
*
11+
* Created on May 14, 2016, 12:26 AM
12+
*/
13+
14+
#include <stdio.h>
15+
#include <stdlib.h>
16+
17+
/*
18+
*
19+
*/
20+
int main(int argc, char** argv) {
21+
countingNumberofOneswithTogglingApproach_test();
22+
return (EXIT_SUCCESS);
23+
}
24+

src/Chapter_01_Introduction/ComplexityWithBreakStatement.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ int functionWithBreak(int n){
2323
}
2424
printf("%d\n", count);
2525
}
26-
int main(){
26+
int functionWithBreak_test(){
2727
int n = 20;
2828
functionWithBreak(n);
2929
}

0 commit comments

Comments
 (0)