diff --git a/COM390/Project 1/CoverSheet.docx b/COM390/Project 1/CoverSheet.docx
new file mode 100644
index 0000000..fe65779
Binary files /dev/null and b/COM390/Project 1/CoverSheet.docx differ
diff --git a/COM390/Project 1/CoverSheet.pdf b/COM390/Project 1/CoverSheet.pdf
new file mode 100644
index 0000000..628abc0
Binary files /dev/null and b/COM390/Project 1/CoverSheet.pdf differ
diff --git a/COM390/Project 1/Project 1/Project 1.vcxproj b/COM390/Project 1/Project 1/Project 1.vcxproj
index b25836a..3be908d 100644
--- a/COM390/Project 1/Project 1/Project 1.vcxproj
+++ b/COM390/Project 1/Project 1/Project 1.vcxproj
@@ -19,7 +19,7 @@
Application
true
- v120
+ v110
Unicode
diff --git a/COM390/Project 1/Project 1/main.c b/COM390/Project 1/Project 1/main.c
index 2429951..c6edbd2 100644
--- a/COM390/Project 1/Project 1/main.c
+++ b/COM390/Project 1/Project 1/main.c
@@ -1,39 +1,60 @@
+/******************************************************************************
+ * Program: COM 390 - Project 1
+ * Author: Amrit Panesar
#include
#include
-const char* HELLO ="I love Porgramming in C\n";
-const char* TOKENS = " ";
-const int TOKENINDEX = 1; // insert name after token 0
+const char* CAKE = " \xdc\n \xdb\n \xdc\xdc \xdc\xdf\n \xdc\xdb\xdb\xdb\xdb\xdb\xdb\xdc \xdc\xdc\xdc\xdc\xdc\xdc\xdb\xdb\xdb\xdf\xdb\n \xdc\xdb \xdb\xdb\xdb\xdb\xdb\xdb\xdb \xdb\xdb\xdf\xdf\xdf \xdc\xdc\xdb\xdf\xdb\xdc\xdb\xdb\xdb\n \xdb\xdf\xdf\xdf \xdb\xdb\xdb\xdb\xdb\xdf\xdf\xdc\xdb\xdf\xdc\xdc\xdf\xdf\xdc\xdc\xdb\xdb\xdb\xdb\xdb\xdb\xdb\n \xdb\xdf\xdc\xdc\xdc\xdc\xdb\xdb\xdb \xdc\xdc\xdb\xdf\xdf\xdc\xdc\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdf\xdf\xdc\xdc\n \xdb \xdf\xdf\xdf\xdf\xdf\xdf\xdc\xdc\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdf\xdf\xdc\xdc\xdb\xdb\xdb\xdb\n \xdb \xdb\xdb\xdb\xdb\xdb\xdf\xdf\xdf\xdc\xdc\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdf\n \xdb \xdb\xdf\xdf \xdc\xdc\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdf\xdb\xdc\xdc\xdb\n \xdb \xdc\xdc\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdf\xdb\xdc\xdb\xdb\xdb\xdb\xdb\xdb\n \xdb \xdb\xdb\xdb\xdb\xdf\xdf\xdc\xdc\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdf\xdf\n \xdb \xdf\xdf\xdc\xdc\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdf\xdf\n \xdb \xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdf\xdf\n \xdf\xdc\xdc\xdc \xdb\xdb\xdb\xdf\xdf\n \xdf\xdf\xdf\xdf\xdf\xdf";
+
+const char* HELLO ="I love Programming in C\n";
+
+const char* TOKENS = " ";
+
+const int TOKENINDEX = 1; // insert name after token 0
char name[256], out[256];
-char* token, nextToken = NULL;
+char *token, *nextToken = NULL;
-int main(int argc, char** argv) {
+int i = 0;
- printf("%s\n:", "Please enter your name");
- gets_s(name, sizeof(name));
- strcpy(out, HELLO);
+// lets begin
- token = strtok_s(out, TOKENS, &nextToken);
+int main(int argc, char **argv) {
- for (int i = 0; token != NULL; i++) {
+ printf("%s\n:", "Please enter your name"); // prompt for name
+ gets_s(name, sizeof(name)); // set the string into the buffer
+ printf("\n\n"); // new lines
+
+ strcpy(out, HELLO); // copy the string to be tokenized into a mutable buffer
+
+ token = strtok(out, TOKENS); // start the tokenizer
+
+ for (i = 0; token != NULL; i++) // time to loop over the tokens
+ {
if (i == TOKENINDEX) {
- printf(", %s,", name);
+ printf(", %s,", name); // insert after the token index
}
if (i == 0) {
- printf("%s", token);
+ printf("%s", token); // token 0 does not get a space (anticipation for name/token 1)
} else {
- printf(" %s", token);
+ printf(" %s", token); // display a space followed by the token data
}
- token = strtok_s(NULL, TOKENS, &nextToken);
+ token = strtok(NULL, TOKENS); // delta next token
}
- printf("\n%s\n", "Press any key to continue. . .");
- _getch();
+ printf("\n\n%s\n%s\n", "It's a piece of cake!", CAKE); // cake
- return 0;
+ printf("\n%s\n", "Press any key to continue. . .");
+ getch(); // pause
+
+ return 0; // done!
}
\ No newline at end of file
diff --git a/COM390/Project 1/Screenshots.docx b/COM390/Project 1/Screenshots.docx
new file mode 100644
index 0000000..67ec752
Binary files /dev/null and b/COM390/Project 1/Screenshots.docx differ
diff --git a/COM390/Project 1/Screenshots.pdf b/COM390/Project 1/Screenshots.pdf
new file mode 100644
index 0000000..1f1dada
Binary files /dev/null and b/COM390/Project 1/Screenshots.pdf differ
diff --git a/COM390/Project 1/main-c.pdf b/COM390/Project 1/main-c.pdf
new file mode 100644
index 0000000..01b5eaf
Binary files /dev/null and b/COM390/Project 1/main-c.pdf differ
diff --git a/COM390/Project2/Project2.sln b/COM390/Project2/Project2.sln
new file mode 100644
index 0000000..34772a7
--- /dev/null
+++ b/COM390/Project2/Project2.sln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2012
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Project2", "Project2\Project2.vcxproj", "{AA5F6F52-3BEB-4457-ABA0-A005715CE47F}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {AA5F6F52-3BEB-4457-ABA0-A005715CE47F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {AA5F6F52-3BEB-4457-ABA0-A005715CE47F}.Debug|Win32.Build.0 = Debug|Win32
+ {AA5F6F52-3BEB-4457-ABA0-A005715CE47F}.Release|Win32.ActiveCfg = Release|Win32
+ {AA5F6F52-3BEB-4457-ABA0-A005715CE47F}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/COM390/Project2/Project2/Project2.vcxproj b/COM390/Project2/Project2/Project2.vcxproj
new file mode 100644
index 0000000..facaf63
--- /dev/null
+++ b/COM390/Project2/Project2/Project2.vcxproj
@@ -0,0 +1,75 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+
+ {AA5F6F52-3BEB-4457-ABA0-A005715CE47F}
+ Project2
+
+
+
+ Application
+ true
+ v110
+ MultiByte
+
+
+ Application
+ false
+ v110
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Level3
+ Disabled
+ true
+
+
+ true
+
+
+
+
+ Level3
+ MaxSpeed
+ true
+ true
+ true
+
+
+ true
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/COM390/Project2/Project2/Project2.vcxproj.filters b/COM390/Project2/Project2/Project2.vcxproj.filters
new file mode 100644
index 0000000..07088b7
--- /dev/null
+++ b/COM390/Project2/Project2/Project2.vcxproj.filters
@@ -0,0 +1,27 @@
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+ {93995380-89BD-4b04-88EB-625FBE52EBFB}
+ h;hpp;hxx;hm;inl;inc;xsd
+
+
+ {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
+ rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
+
+
+
+
+ Source Files
+
+
+
+
+ Header Files
+
+
+
\ No newline at end of file
diff --git a/COM390/Project2/Project2/main.c b/COM390/Project2/Project2/main.c
new file mode 100644
index 0000000..e1e0a90
--- /dev/null
+++ b/COM390/Project2/Project2/main.c
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * Program: COM 390 - Project 2
+ * Author: Amrit Panesar 0) {
+ sprintf("%d03", j);
+ }
+ return TRUE;
+}
+
+void pause() {
+ printf("Press any key to continue. . .");
+ getch();
+}
\ No newline at end of file
diff --git a/COM390/Project2/Project2/main.h b/COM390/Project2/Project2/main.h
new file mode 100644
index 0000000..7f941b9
--- /dev/null
+++ b/COM390/Project2/Project2/main.h
@@ -0,0 +1,20 @@
+/******************************************************************************
+ * Program: COM 390 - Project 2
+ * Author: Amrit Panesar
+#include
+#include
+#include
+
+typedef int bool;
+#define TRUE 1
+#define FALSE 0
+
+bool zero2hundred();
+bool hundred2zero();
+
+void pause();
diff --git a/SDrive/Templates/CoverSheet.dotx b/SDrive/Templates/CoverSheet.dotx
index 722ebf5..c36713a 100644
Binary files a/SDrive/Templates/CoverSheet.dotx and b/SDrive/Templates/CoverSheet.dotx differ