User Tools

Site Tools


journal:spring2020:bmurphy7:week9

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
journal:spring2020:bmurphy7:week9 [2020/03/26 00:33]
bmurphy7
journal:spring2020:bmurphy7:week9 [2020/03/26 00:34] (current)
bmurphy7
Line 9: Line 9:
 So this week is the first full week in coronaggeddon so this week has been trying to get used to doing work completely online, and I will admit that I haven'​t really been working on much besides figuring out my physics stuff. But I will say that I have had to help with some friends with their work for Unix and C. For Unix project is was trying to grab the patterns that could be found in pi. How I aided was teach them how a if/​elif/​else statements work since they were having problems figuring out why it was only accessing one option first. Then why it was printing out everything from every option. So I had to introduce them to nested if statements, and then explain why they wanted to use them for getting the separate data that they need. As for C I helped explain what pointers are, which they a way to point to a specific point of memory. Then using this I explained why: So this week is the first full week in coronaggeddon so this week has been trying to get used to doing work completely online, and I will admit that I haven'​t really been working on much besides figuring out my physics stuff. But I will say that I have had to help with some friends with their work for Unix and C. For Unix project is was trying to grab the patterns that could be found in pi. How I aided was teach them how a if/​elif/​else statements work since they were having problems figuring out why it was only accessing one option first. Then why it was printing out everything from every option. So I had to introduce them to nested if statements, and then explain why they wanted to use them for getting the separate data that they need. As for C I helped explain what pointers are, which they a way to point to a specific point of memory. Then using this I explained why:
 char variable[10] and char * variable = NULL; variable =  (code to malloc up the space) ​ char variable[10] and char * variable = NULL; variable =  (code to malloc up the space) ​
-is different, especially when trying to compare the too with strings. For one you are just setting up an array of characters, while the other is setting up pointer to a piece of memory that happens to be the start of an array of chars, which can be more useful for we can control where the pointer goes.+is different, especially when trying to compare the too with strings. For one you are just setting up an array of characters, while the other is setting up pointer to a piece of memory that happens to be the start of an array of chars, which can be more useful for we can control where the pointer goes, rather than wherever it would start from the doing the array.
journal/spring2020/bmurphy7/week9.txt · Last modified: 2020/03/26 00:34 by bmurphy7