In today's class we discussed chapter 8, "Strings and Vectors". It is important that when working with strings always leave an extra space in the elements for the null character '\0' which declares where the string ends. Declaring a C-string variable is done using an array of characters.
For example:
char s[11];
Returning to what I said earlier about saving an extra space character, declaring a C-string as char s[11] creates space for only 10 characters since the null character terminator requires the other (1) space.
I graduated from Guamani Private School in Guayama, Puerto Rico in June 2013. I got accepted to the UPRM with a major in Computer Engineering but soon realized that engineering was not for me. After receiving guidance, I decided that Computer Science was right for me. The fact that I love math is the cherry on top. I hope you enjoy this blog and my experiences during the course COMP3010 (Introduction to Computer Programming I).
Wednesday, April 30, 2014
Monday, April 28, 2014
Class of April 28, 2014
In today's class, the professor discussed some concepts that after reading over the next lab assignment I know will help me in completing it. I am getting better at arrays I just need a little bit more practice. Hopefully during summer I will be able to complete some problems from COJ.
Friday, April 25, 2014
Class of April 25, 2014
In today's class we discussed arrays in functions. They are declared using empty brackets. I need to review this concept once more to understand it better. Today we also discussed searching arrays. One way to search an array for a given value is to look at each element from first to last to see if the target value is equal to any of the array elements.
Wednesday, April 23, 2014
Class of April 23, 2014
In today's class we finally discussed arrays! I wished we would have discussed it before having to do Lab #6. An important thing I learned is that square brackets [ ] in a declaration means how many variables and square brackets [ ] outside means which one. A topic I need to review is Arrays in Functions because I had some trouble understanding it completely.
Wednesday, April 9, 2014
Class of April 9, 2014 (Midterm #2)
Today was the second midterm. I cannot believe how hard it was for me. There were many parts I was not able to complete. I am very slow at writing programs which is why I had some trouble on the test and know now that I need to practice more on COJ.
Monday, April 7, 2014
Problems with Lab #6!!
I began doing Lab #6. I cannot believe how hard it is. I was able to do the first two without any problem but now I am stuck on the others. I just wish the professor would teach us first what he assigns us to do on the labs. I understand what he means for us to do (read ahead and learn) but for me, a newbie, it is really hard to understand what needs to be done if there is no one to explain it to me even if I read ahead. Especially now that things are getting a lot more complicated. I cannot get a bad grade on this assignment when I am almost finishing the course.
Friday, April 4, 2014
Class of April 4, 2014
In today's class we started to review for the second midterm. Wow, I cannot believe the semester is almost over. We only have left a few more assignments and then we are done. Back to the midterm review, I really need to study more because there are some topics which I am not dominating much. I need to practice before April 9.
Wednesday, April 2, 2014
Class of April 2, 2014
Some of the subjects we covered in today's lecture were: creating space in output, using flags, the setw and setprecision manipulator, among others. I found the setw manipulator a bit confusing at first but after reading over it again I understood what it does and I even did an example from the chapter slides. I really need to go over again all the slides especially this chapter since the test is next Wednesday and I am pretty confused. I hope lab 6 isn't that hard either.
Subscribe to:
Comments (Atom)