{"id":386,"date":"2019-05-22T03:06:54","date_gmt":"2019-05-22T03:06:54","guid":{"rendered":"http:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/?page_id=386"},"modified":"2019-05-29T17:33:16","modified_gmt":"2019-05-29T17:33:16","slug":"lab-1","status":"publish","type":"page","link":"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/program-methodology-i-lab-summer-2019\/lab-1\/","title":{"rendered":"Lab 1"},"content":{"rendered":"<h1>Part 1 &#8211; Understand your compiler<\/h1>\n<hr \/>\n<h2><\/h2>\n<h2>1.1 &#8211; Compiling a program via Command Line<\/h2>\n<hr \/>\n<p>We will primarily use the Linux terminal in examples. Any IDE may be used, but programs must be able to compile in the B-125 computer lab.<\/p>\n<p><strong>Step 1: Open your Terminal<\/strong><\/p>\n<p><strong>Step 2: Type &#8220;cd&#8221;<\/strong><\/p>\n<p><strong>Step 3: Type &#8220;mkdir Lab1&#8221;<\/strong><\/p>\n<p><strong>Step 4: Type &#8220;cd Lab1&#8221;<\/strong><\/p>\n<p><strong>Step 5: Type &#8220;nano hello.cpp&#8221; and enter the following code<\/strong><\/p>\n<div style=\"background: #f0f0f0;overflow: auto;width: auto;border: solid gray;border-width: .1em .1em .1em .8em;padding: .2em .6em\">\n<table style=\"height: 107px\" width=\"230\">\n<tbody>\n<tr>\n<td>\n<pre style=\"margin: 0;line-height: 125%\"> 1\r\n 2\r\n 3\r\n 4\r\n 5\r\n 6\r\n 7\r\n 8\r\n 9\r\n10\r\n11\r\n12<\/pre>\n<\/td>\n<td>\n<pre style=\"margin: 0;line-height: 125%\"><span style=\"color: #60a0b0;font-style: italic\">\/\/ This is a comment<\/span>\r\n\r\n<span style=\"color: #007020\">#include &lt;iostream&gt;<\/span>\r\n\r\n<span style=\"color: #007020;font-weight: bold\">using<\/span> <span style=\"color: #007020;font-weight: bold\">namespace<\/span> std;\r\n\r\n<span style=\"color: #902000\">int<\/span> <span style=\"color: #06287e\">main<\/span>()\r\n{\r\n     cout <span style=\"color: #666666\">&lt;&lt;<\/span> <span style=\"color: #4070a0\">\"Hello World\\n\"<\/span>; \r\n\r\n     <span style=\"color: #007020;font-weight: bold\">return<\/span> <span style=\"color: #40a070\">0<\/span>;\r\n}\r\n<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>&nbsp;<\/p>\n<p><strong>Step 6: Save the .cpp file by typing &#8220;Ctrl+O&#8221;, then [Enter] <\/strong><\/p>\n<p><strong>Step 7: Exit nano by typing &#8220;Ctrl+X&#8221;<\/strong><\/p>\n<p><strong>Step 8: Compile the C++ Program by typing &#8220;g++ -o hello hello.cpp&#8221; where hello is the executable or object file<\/strong><\/p>\n<p><strong>Step 9: Run the executable by typing &#8220;.\/hello&#8221; in the terminal<\/strong><\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2>1.2 &#8211; Flags for command line<\/h2>\n<hr \/>\n<p>Most common GCC and Clang compiler flags<\/p>\n<p>&nbsp;<\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td><strong>std Flags<\/strong><\/td>\n<td>Specify the C++ version or ISO standard version.<\/td>\n<\/tr>\n<tr>\n<td>-std=c++11<\/td>\n<td>Specifies ISO C++11<\/td>\n<\/tr>\n<tr>\n<td>-std=c++14<\/td>\n<td>Specifies ISO C++14<\/td>\n<\/tr>\n<tr>\n<td>-std=c++1z<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>-std=c++20<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>-std=gnu++<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td><strong>Verbosity Flags<\/strong><\/td>\n<td>W stands for warning<\/td>\n<\/tr>\n<tr>\n<td>-Wall<\/td>\n<td>Turns on different compiler warning flags such as -Waddress, -Wcomment, -Wformat, -Wbool-compare, -Wuninitialized, -Wunknown-pragmas, -Wunused-value, &#8230;<\/td>\n<\/tr>\n<tr>\n<td>-Werror<\/td>\n<td>Turns any warning into a compilation error<\/td>\n<\/tr>\n<tr>\n<td>-Wextra<\/td>\n<td>Enables flags that are not enabled with -Wall<\/td>\n<\/tr>\n<tr>\n<td>-pendantic or -Wpendantic<\/td>\n<td>Issue all warning required by ISO C and ISO C++ standard, it issues warning whenever there are compiler extensions non compliant to ISO C or C++ standard.<\/td>\n<\/tr>\n<tr>\n<td>-Wconversion<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>-Wcast-align<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>-Wunnused<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>-Wshadow<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>-Wold-style-cast<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>-Wpointer-arith<br \/>\n-Wcast-qual<br \/>\n-Wmissing-prototypes<br \/>\n-Wno-missing-braces<\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<hr \/>\n<h2><\/h2>\n<h2>1.3 &#8211; Writing your first Makefile<\/h2>\n<hr \/>\n<p>In this section we are going to continue working with the hello.cpp file that was created in Section 1.1.<\/p>\n<p><strong>Step 1: Type &#8220;nano Makefile&#8221; and type the contents from below.\u00a0<\/strong><\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #f0f0f0;overflow: auto;width: auto;border: solid gray;border-width: .1em .1em .1em .8em;padding: .2em .6em\">\n<table style=\"height: 139px\" width=\"245\">\n<tbody>\n<tr>\n<td>\n<pre style=\"margin: 0;line-height: 125%\"> 1\r\n 2\r\n 3\r\n 4\r\n 5\r\n 6\r\n 7\r\n 8\r\n 9\r\n10\r\n11\r\n12\r\n13\r\n14<\/pre>\n<\/td>\n<td>\n<pre style=\"margin: 0;line-height: 125%\"><span style=\"color: #bb60d5\">CC<\/span><span style=\"color: #666666\">=<\/span>g++\r\n\r\n<span style=\"color: #bb60d5\">CFLAGS<\/span><span style=\"color: #666666\">=<\/span>-g -Wall -Wpedantic -Werror\r\n\r\n<span style=\"color: #06287e\">all<\/span><span style=\"color: #666666\">:<\/span> <span style=\"color: #40a070\">main<\/span>\r\n\r\n<span style=\"color: #06287e\">hello.o<\/span><span style=\"color: #666666\">:<\/span> <span style=\"color: #40a070\">hello.cpp<\/span>\r\n        <span style=\"color: #007020;font-weight: bold\">${<\/span><span style=\"color: #bb60d5\">CC<\/span><span style=\"color: #007020;font-weight: bold\">}<\/span> <span style=\"color: #007020;font-weight: bold\">${<\/span><span style=\"color: #bb60d5\">CFLAGS<\/span><span style=\"color: #007020;font-weight: bold\">}<\/span> -c hello.cpp\r\n\r\n<span style=\"color: #06287e\">main<\/span><span style=\"color: #666666\">:<\/span> <span style=\"color: #40a070\">hello.o<\/span>\r\n        <span style=\"color: #007020;font-weight: bold\">${<\/span><span style=\"color: #bb60d5\">CC<\/span><span style=\"color: #007020;font-weight: bold\">}<\/span> <span style=\"color: #007020;font-weight: bold\">${<\/span><span style=\"color: #bb60d5\">CFLAGS<\/span><span style=\"color: #007020;font-weight: bold\">}<\/span> -o main hello.o\r\n\r\n<span style=\"color: #06287e\">clean<\/span><span style=\"color: #666666\">:<\/span>\r\n        <span style=\"color: #007020;font-weight: bold\">${<\/span><span style=\"color: #bb60d5\">RM<\/span><span style=\"color: #007020;font-weight: bold\">}<\/span> *.o main\r\n<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>&nbsp;<\/p>\n<p><strong>Step 2: Save the file and exit<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Sections Explained:<\/p>\n<p><strong>Line 1: CC=g++<\/strong> &#8211; Specifies the compiler. <strong>gcc<\/strong> for C programs and <strong>g++<\/strong> for C++ programs<\/p>\n<p><strong>Line 3: CFLAGS<\/strong> &#8211; Specifies the compiler flags to be applied when compiling the programs.<\/p>\n<p>The first flag that is used when compiling is the\u00a0<strong>-g<\/strong> flag which tells the compiler to add debugging information to the executable file. The\u00a0<strong>-Wall<\/strong> flag, as described above, turns on most of the warning flags for the compiler. The\u00a0<strong>-Wpedantic<\/strong> flag will issue warnings when there are noncompliant compiler extensions used. The\u00a0<strong>-Werror<\/strong> flag will turn any warning from the compiler into an error.<\/p>\n<p><strong>Line 5: all: main<\/strong> &#8211; Specifies the targets to be made<\/p>\n<p><strong>Line 7: hello.o: hello.cpp\u00a0<\/strong>&#8211; Creates the object file\u00a0<strong>hello.o<\/strong> from the source file\u00a0<strong>hello.cpp<\/strong><\/p>\n<p><strong>Line 8<\/strong> uses the\u00a0<strong>CC<\/strong> and\u00a0<strong>CFLAGS<\/strong> variables that we defined earlier in the Makefile and invokes the compiler with the\u00a0<strong>-c<\/strong> flag<\/p>\n<p><strong>Line 10: main: hello.o<\/strong> &#8211; Creates the executable file from the previously generated object file<\/p>\n<p><strong>Line 11<\/strong> uses the\u00a0<strong>CC<\/strong> and\u00a0<strong>CFLAGS\u00a0<\/strong>variables that was defined earlier in the Makefile and links the generated object file to the executable\u00a0<strong>main<\/strong><\/p>\n<p><strong>Line 13: clean:<\/strong> &#8211; Specifies what is executed when &#8220;make clean&#8221; is called<\/p>\n<p><strong>Line 14:\u00a0<\/strong>Tells &#8220;make clean&#8221; to remove all object files (files ending in .o) and the target executable\u00a0<strong>main<\/strong><\/p>\n<hr \/>\n<h2><\/h2>\n<h2>1.4 &#8211; Compiling a program with a Makefile<\/h2>\n<hr \/>\n<p>In order to compile with the Makefile that we just created type &#8220;make&#8221; into the terminal. When you examine your working directory you will notice two new files titled &#8220;hello.o&#8221; and &#8220;main&#8221;. &#8220;main&#8221; is an executable file that can be run by typing &#8220;.\/main&#8221; into the terminal.<\/p>\n<p>The &#8220;clean&#8221; section we defined in the Makefile can be used to clean our working directory from all files ending in &#8220;.o&#8221; and the file main. This can be utilized by typing &#8220;make clean&#8221; into the terminal.<\/p>\n<hr \/>\n<h1><\/h1>\n<h1>Part 2 &#8211; Writing Programs<\/h1>\n<hr \/>\n<p>When writing the following programs you will want to take in user input as arguments to your program. This can be done by changing <strong>main()<\/strong> to <strong>main(int argc, char **argv)<\/strong>.\u00a0<strong>argc<\/strong> is an integer value representing the number of command line arguments the user enters, including the name of the program.\u00a0<strong>argv\u00a0<\/strong>stands for ARGument Vector and is an array of character pointers which contains all the command line arguments including the name of the program at <strong>argv[0]<\/strong>. An example of using both the\u00a0<strong>argc<\/strong> and\u00a0<strong>argv<\/strong> values can be seen as follows:<br \/>\n<!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #f0f0f0;overflow: auto;width: auto;border: solid gray;border-width: .1em .1em .1em .8em;padding: .2em .6em\">\n<table>\n<tbody>\n<tr>\n<td>\n<pre style=\"margin: 0;line-height: 125%\"> 1\r\n 2\r\n 3\r\n 4\r\n 5\r\n 6\r\n 7\r\n 8\r\n 9\r\n10\r\n11\r\n12\r\n13\r\n14<\/pre>\n<\/td>\n<td>\n<pre style=\"margin: 0;line-height: 125%\"><span style=\"color: #007020\">#include &lt;iostream&gt; <\/span>\r\n<span style=\"color: #007020;font-weight: bold\">using<\/span> <span style=\"color: #007020;font-weight: bold\">namespace<\/span> std; \r\n  \r\n<span style=\"color: #902000\">int<\/span> <span style=\"color: #06287e\">main<\/span>(<span style=\"color: #902000\">int<\/span> argc, <span style=\"color: #902000\">char<\/span><span style=\"color: #666666\">**<\/span> argv) \r\n{ \r\n    cout <span style=\"color: #666666\">&lt;&lt;<\/span> <span style=\"color: #4070a0\">\"You have entered \"<\/span> <span style=\"color: #666666\">&lt;&lt;<\/span> argc <span style=\"color: #666666\">&lt;&lt;<\/span> <span style=\"color: #4070a0\">\" arguments:\"<\/span> <span style=\"color: #666666\">&lt;&lt;<\/span> <span style=\"color: #4070a0\">\"<\/span><span style=\"color: #4070a0;font-weight: bold\">\\n<\/span><span style=\"color: #4070a0\">\"<\/span>; \r\n  \r\n    <span style=\"color: #007020;font-weight: bold\">for<\/span> (<span style=\"color: #902000\">int<\/span> i <span style=\"color: #666666\">=<\/span> <span style=\"color: #40a070\">0<\/span>; i <span style=\"color: #666666\">&lt;<\/span> argc; <span style=\"color: #666666\">++<\/span>i) \r\n    {\r\n         cout <span style=\"color: #666666\">&lt;&lt;<\/span> argv[i] <span style=\"color: #666666\">&lt;&lt;<\/span> <span style=\"color: #4070a0\">\"<\/span><span style=\"color: #4070a0;font-weight: bold\">\\n<\/span><span style=\"color: #4070a0\">\"<\/span>; \r\n    }\r\n\r\n    <span style=\"color: #007020;font-weight: bold\">return<\/span> <span style=\"color: #40a070\">0<\/span>; \r\n} \r\n<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>&nbsp;<\/p>\n<p>Say we compiled the above program with the following command<\/p>\n<p><strong>g++ -o main example.cpp<\/strong><\/p>\n<p>and then ran the executable as follows<\/p>\n<p><strong>.\/main programming methodology is fun<\/strong><\/p>\n<p>you will achieve the following output.<\/p>\n<p><strong>You have entered 5 arguments:<br \/>\n.\/main<br \/>\nprogramming<br \/>\nmethodology<br \/>\nis<br \/>\nfun<\/strong><\/p>\n<hr \/>\n<h2><\/h2>\n<h2>2.1 &#8211; Question 1<\/h2>\n<hr \/>\n<p>Given a positive integer denoting n, do the following:<\/p>\n<ul>\n<li>If 1 &lt;= n &lt;= 9, then print the lowercase English word corresponding to the number (e.g., one for 1, two for 2, etc.)<\/li>\n<li>If n &gt; 9, print &#8220;Greater than 9&#8221;<\/li>\n<\/ul>\n<p><strong>INPUT: <\/strong>A single integer denoting n (Assume n is positive)<\/p>\n<p><strong>CONSTRAINTS<\/strong><strong>:<\/strong> 1 &lt;= n &lt;= 10^9<\/p>\n<p><strong>OUTPUT:<\/strong> If 1&lt;=n&lt;=9, then print the lowercase English word corresponding to the number (e.g. one for 1, two for 2, &#8230;.); otherwise print &#8216;Greater than 9&#8217; instead.<\/p>\n<hr \/>\n<h2><\/h2>\n<h2>2.2 &#8211; Question 2<\/h2>\n<hr \/>\n<p>Write a program that calculates and displays a person&#8217;s body mass index (BMI). The BMI is often used to determine whether a person with a sedentary lifestyle is overweight or underweight for his or her height. A person&#8217;s BMI is calculated with the following formula:<\/p>\n<p>BMI = weight x 703 \/ height^2<\/p>\n<p>where weight is measured in pounds and height is measured in inches. The program should display a message indicating whether the person has optimal weight, is underweight, or is overweight. A sedentary person&#8217;s weight is considered to be optimal if his or her BMI is between 18.5 and 25. If the BMI is less than 18.5, the person is considered to be underweight. If the BMI value is greater than 25, the person is considered to be overweight.<\/p>\n<p><strong>INPUT:<\/strong> Positive integer denoting weight and another positive integer denoting height<\/p>\n<p><strong>CONSTRAINTS:<\/strong> 1 &lt;= weight &lt;= 10^9\u00a0 \u00a0 \u00a0and\u00a0 \u00a0 \u00a01 &lt;= height &lt;= 10^9<\/p>\n<p><strong>OUTPUT:\u00a0<\/strong>If BMI &lt; 18.5, output &#8220;underweight&#8221;. If 18.5 &lt;= BMI &lt;= 25, output &#8220;optimal weight&#8221;. If BMI &gt; 25, output &#8220;overweight&#8221;.<\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n<h2>2.3 &#8211; Question 3<\/h2>\n<hr \/>\n<p>Write a program that will take three arguments from the user, a starting temperature in Celsius, an ending temperature in Celsius and a step size. Display the value of Celsius and the converted value in Fahrenheit for each step on a newline. The formula that converts Celsius temperature to Fahrenheit is<\/p>\n<p>F= 9\/5 * C + 32<\/p>\n<p>where F is the Fahrenheit temperature and C is the Celsius temperature.<\/p>\n<p>If the step size does not match exactly with the final ending Celsius value, you may skip printing the value.<\/p>\n<p><strong>INPUT:<\/strong> .\/q3 start step end where start is the beginning Celsius value, step is the step size, and end is the final Celsius value<\/p>\n<p><strong>CONSTRAINTS:\u00a0<\/strong>Step size &gt; end &#8211; start. Set a minimum limit for which you will not accept starting temperatures lower than and a maximum limit which start values cannot be higher than. These two limits should be defined as constants in your code.<\/p>\n<p><strong>OUTPUT:<\/strong> .\/q3 0 2 4<\/p>\n<p>0 32<\/p>\n<p>2 35.6<\/p>\n<p>4 39.2<\/p>\n<hr \/>\n<h1><\/h1>\n<h1>What to submit?<\/h1>\n<hr \/>\n<p><strong>Lab1_LastName_FirstName.zip<br \/>\n|<br \/>\n|&#8212;&#8211;&gt;Lab1<br \/>\n|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|<br \/>\n|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|&#8212;&#8211;&gt;hello.cpp<br \/>\n|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|<br \/>\n|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|&#8212;&#8211;&gt;Makefile<br \/>\n|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|<br \/>\n|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|&#8212;&#8211;&gt;Q1<br \/>\n|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0|<br \/>\n|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0|&#8212;&#8211;&gt;q1.cpp<br \/>\n|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0|<br \/>\n|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0|&#8212;&#8211;&gt;q1.h (if used)<br \/>\n|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0|<br \/>\n|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0|&#8212;&#8211;&gt;Makefile<br \/>\n|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|<br \/>\n|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|&#8212;&#8211;&gt;Q2<br \/>\n|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0|<br \/>\n|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0|&#8212;&#8211;&gt;q2.cpp<br \/>\n|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0|<br \/>\n|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0|&#8212;&#8211;&gt;q2.h (if used)<br \/>\n|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0|<br \/>\n|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0|&#8212;&#8211;&gt;Makefile<br \/>\n|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|<br \/>\n|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|&#8212;&#8211;&gt;Q3<br \/>\n|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0|<br \/>\n|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0|&#8212;&#8211;&gt;q3.cpp<br \/>\n|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0|<br \/>\n|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0|&#8212;&#8211;&gt;q3.h (if used)<br \/>\n|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0|<br \/>\n|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0|\u00a0 \u00a0 \u00a0 \u00a0 \u00a0|&#8212;&#8211;&gt;Makefile<\/strong><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Part 1 &#8211; Understand your compiler 1.1 &#8211; Compiling a program via Command Line We will primarily use the Linux terminal in examples. Any IDE may be used, but programs &hellip; <a href=\"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/program-methodology-i-lab-summer-2019\/lab-1\/\" class=\"\">Read More<\/a><\/p>\n","protected":false},"author":129,"featured_media":0,"parent":371,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"template-custom.php","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-386","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Lab 1 - Demetrios Lambropoulos<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/program-methodology-i-lab-summer-2019\/lab-1\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Lab 1 - Demetrios Lambropoulos\" \/>\n<meta property=\"og:description\" content=\"Part 1 &#8211; Understand your compiler 1.1 &#8211; Compiling a program via Command Line We will primarily use the Linux terminal in examples. Any IDE may be used, but programs &hellip; Read More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/program-methodology-i-lab-summer-2019\/lab-1\/\" \/>\n<meta property=\"og:site_name\" content=\"Demetrios Lambropoulos\" \/>\n<meta property=\"article:modified_time\" content=\"2019-05-29T17:33:16+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/program-methodology-i-lab-summer-2019\/lab-1\/\",\"url\":\"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/program-methodology-i-lab-summer-2019\/lab-1\/\",\"name\":\"Lab 1 - Demetrios Lambropoulos\",\"isPartOf\":{\"@id\":\"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/#website\"},\"datePublished\":\"2019-05-22T03:06:54+00:00\",\"dateModified\":\"2019-05-29T17:33:16+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/program-methodology-i-lab-summer-2019\/lab-1\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/program-methodology-i-lab-summer-2019\/lab-1\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/program-methodology-i-lab-summer-2019\/lab-1\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Program Methodology I Lab Summer 2019\",\"item\":\"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/program-methodology-i-lab-summer-2019\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Lab 1\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/#website\",\"url\":\"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/\",\"name\":\"Demetrios Lambropoulos\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Lab 1 - Demetrios Lambropoulos","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/program-methodology-i-lab-summer-2019\/lab-1\/","og_locale":"en_US","og_type":"article","og_title":"Lab 1 - Demetrios Lambropoulos","og_description":"Part 1 &#8211; Understand your compiler 1.1 &#8211; Compiling a program via Command Line We will primarily use the Linux terminal in examples. Any IDE may be used, but programs &hellip; Read More","og_url":"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/program-methodology-i-lab-summer-2019\/lab-1\/","og_site_name":"Demetrios Lambropoulos","article_modified_time":"2019-05-29T17:33:16+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/program-methodology-i-lab-summer-2019\/lab-1\/","url":"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/program-methodology-i-lab-summer-2019\/lab-1\/","name":"Lab 1 - Demetrios Lambropoulos","isPartOf":{"@id":"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/#website"},"datePublished":"2019-05-22T03:06:54+00:00","dateModified":"2019-05-29T17:33:16+00:00","breadcrumb":{"@id":"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/program-methodology-i-lab-summer-2019\/lab-1\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/program-methodology-i-lab-summer-2019\/lab-1\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/program-methodology-i-lab-summer-2019\/lab-1\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/"},{"@type":"ListItem","position":2,"name":"Program Methodology I Lab Summer 2019","item":"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/program-methodology-i-lab-summer-2019\/"},{"@type":"ListItem","position":3,"name":"Lab 1"}]},{"@type":"WebSite","@id":"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/#website","url":"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/","name":"Demetrios Lambropoulos","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/wp-json\/wp\/v2\/pages\/386"}],"collection":[{"href":"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/wp-json\/wp\/v2\/users\/129"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/wp-json\/wp\/v2\/comments?post=386"}],"version-history":[{"count":47,"href":"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/wp-json\/wp\/v2\/pages\/386\/revisions"}],"predecessor-version":[{"id":426,"href":"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/wp-json\/wp\/v2\/pages\/386\/revisions\/426"}],"up":[{"embeddable":true,"href":"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/wp-json\/wp\/v2\/pages\/371"}],"wp:attachment":[{"href":"https:\/\/sites.rutgers.edu\/demetrios-lambropoulos\/wp-json\/wp\/v2\/media?parent=386"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}