{"action":"created","comment":{"url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/pulls/comments/176961829","pull_request_review_id":106751642,"id":176961829,"diff_hunk":"@@ -0,0 +1,38 @@\n+#include <stdio.h>\n+\n+void ranges(int x[], int npts, int *max_ptr, int *min_ptr);\n+\n+int a[] = {1,2,3};\n+int b[] = {3,17,2,5,4,3,2};\n+int c[] = {3,2,2,2,2,2};\n+\n+//this might seem like obfuscated code, but I tried clearing it up and it only resulted\n+//in an error\n+int sizes[] = {sizeof(a)/sizeof(a[0]), sizeof(b)/sizeof(b[0]), sizeof(c)/sizeof(c[0])};\n+\n+int main()  {\n+\tint *full[] = {a,b,c};\n+\tfor(int i = 0; i < 3; i++) {\t\t\t\n+\t\tint max;\n+\t\tint min;\n+\t\tranges(full[i], sizes[i], &max, &min);\n+\t\tprintf(\"Min value: %d, Max Value: %d\\n\", min, max);\n+\t}\n+\treturn 0;\n+}\n+\n+void ranges(int x[], int npts, int *max_ptr, int *min_ptr) {\n+\tint curMin = x[0];\n+\tint curMax = x[0];\n+\t//min finding\n+\tfor(int i = 1; i < npts; i++) {\n+\t\tif(x[i] < x[i-1]) { //if the current value is smaller than the last\n+\t\t\tcurMin = x[i];\n+\t\t}\n+\t\telse if(x[i] > x[i-1]) { //if the current value is bigger than the last\n+\t\t\tcurMax = x[i];\n+\t\t}\n+\t}\n+\t*min_ptr = curMin;","path":"question1/q1.c","position":36,"original_position":36,"commit_id":"7d77b6b43ce673cbd478e323802fdb0c89f7d2d3","original_commit_id":"7d77b6b43ce673cbd478e323802fdb0c89f7d2d3","user":{"login":"hong3cooper","id":35014649,"avatar_url":"https://avatars2.githubusercontent.com/u/35014649?v=4","gravatar_id":"","url":"https://api.github.com/users/hong3cooper","html_url":"https://github.com/hong3cooper","followers_url":"https://api.github.com/users/hong3cooper/followers","following_url":"https://api.github.com/users/hong3cooper/following{/other_user}","gists_url":"https://api.github.com/users/hong3cooper/gists{/gist_id}","starred_url":"https://api.github.com/users/hong3cooper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hong3cooper/subscriptions","organizations_url":"https://api.github.com/users/hong3cooper/orgs","repos_url":"https://api.github.com/users/hong3cooper/repos","events_url":"https://api.github.com/users/hong3cooper/events{/privacy}","received_events_url":"https://api.github.com/users/hong3cooper/received_events","type":"User","site_admin":false},"body":"this is setting the contents of what the ptr is pointing to rather than having the ptr pointing to the actual element in the array. You would need min_ptr = &curMin in that case.","created_at":"2018-03-26T00:55:09Z","updated_at":"2018-03-26T01:02:40Z","html_url":"https://github.com/Spring2018-ECE160/hw6-hw6-richard/pull/1#discussion_r176961829","pull_request_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/pulls/1","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/pulls/comments/176961829"},"html":{"href":"https://github.com/Spring2018-ECE160/hw6-hw6-richard/pull/1#discussion_r176961829"},"pull_request":{"href":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/pulls/1","id":172704092,"html_url":"https://github.com/Spring2018-ECE160/hw6-hw6-richard/pull/1","diff_url":"https://github.com/Spring2018-ECE160/hw6-hw6-richard/pull/1.diff","patch_url":"https://github.com/Spring2018-ECE160/hw6-hw6-richard/pull/1.patch","issue_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/issues/1","number":1,"state":"open","locked":false,"title":"Submission","user":{"login":"rlee42","id":20376727,"avatar_url":"https://avatars3.githubusercontent.com/u/20376727?v=4","gravatar_id":"","url":"https://api.github.com/users/rlee42","html_url":"https://github.com/rlee42","followers_url":"https://api.github.com/users/rlee42/followers","following_url":"https://api.github.com/users/rlee42/following{/other_user}","gists_url":"https://api.github.com/users/rlee42/gists{/gist_id}","starred_url":"https://api.github.com/users/rlee42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlee42/subscriptions","organizations_url":"https://api.github.com/users/rlee42/orgs","repos_url":"https://api.github.com/users/rlee42/repos","events_url":"https://api.github.com/users/rlee42/events{/privacy}","received_events_url":"https://api.github.com/users/rlee42/received_events","type":"User","site_admin":false},"body":"Woops, forgot about the pull request, sorry about that. Here is my HW 6.","created_at":"2018-03-04T05:50:58Z","updated_at":"2018-03-26T01:02:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1b9e0ff849c5c178d400224bb9cf949de3763feb","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/pulls/1/commits","review_comments_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/pulls/1/comments","review_comment_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/issues/1/comments","statuses_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/statuses/7d77b6b43ce673cbd478e323802fdb0c89f7d2d3","head":{"label":"Spring2018-ECE160:Submission","ref":"Submission","sha":"7d77b6b43ce673cbd478e323802fdb0c89f7d2d3","user":{"login":"Spring2018-ECE160","id":35201851,"avatar_url":"https://avatars1.githubusercontent.com/u/35201851?v=4","gravatar_id":"","url":"https://api.github.com/users/Spring2018-ECE160","html_url":"https://github.com/Spring2018-ECE160","followers_url":"https://api.github.com/users/Spring2018-ECE160/followers","following_url":"https://api.github.com/users/Spring2018-ECE160/following{/other_user}","gists_url":"https://api.github.com/users/Spring2018-ECE160/gists{/gist_id}","starred_url":"https://api.github.com/users/Spring2018-ECE160/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Spring2018-ECE160/subscriptions","organizations_url":"https://api.github.com/users/Spring2018-ECE160/orgs","repos_url":"https://api.github.com/users/Spring2018-ECE160/repos","events_url":"https://api.github.com/users/Spring2018-ECE160/events{/privacy}","received_events_url":"https://api.github.com/users/Spring2018-ECE160/received_events","type":"Organization","site_admin":false},"repo":{"id":122857973,"name":"hw6-hw6-richard","full_name":"Spring2018-ECE160/hw6-hw6-richard","owner":{"login":"Spring2018-ECE160","id":35201851,"avatar_url":"https://avatars1.githubusercontent.com/u/35201851?v=4","gravatar_id":"","url":"https://api.github.com/users/Spring2018-ECE160","html_url":"https://github.com/Spring2018-ECE160","followers_url":"https://api.github.com/users/Spring2018-ECE160/followers","following_url":"https://api.github.com/users/Spring2018-ECE160/following{/other_user}","gists_url":"https://api.github.com/users/Spring2018-ECE160/gists{/gist_id}","starred_url":"https://api.github.com/users/Spring2018-ECE160/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Spring2018-ECE160/subscriptions","organizations_url":"https://api.github.com/users/Spring2018-ECE160/orgs","repos_url":"https://api.github.com/users/Spring2018-ECE160/repos","events_url":"https://api.github.com/users/Spring2018-ECE160/events{/privacy}","received_events_url":"https://api.github.com/users/Spring2018-ECE160/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Spring2018-ECE160/hw6-hw6-richard","description":"hw6-hw6-richard created by GitHub Classroom","fork":false,"url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard","forks_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/forks","keys_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/teams","hooks_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/hooks","issue_events_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/issues/events{/number}","events_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/events","assignees_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/assignees{/user}","branches_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/branches{/branch}","tags_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/tags","blobs_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/git/refs{/sha}","trees_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/statuses/{sha}","languages_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/languages","stargazers_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/stargazers","contributors_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/contributors","subscribers_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/subscribers","subscription_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/subscription","commits_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/commits{/sha}","git_commits_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/git/commits{/sha}","comments_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/comments{/number}","issue_comment_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/issues/comments{/number}","contents_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/contents/{+path}","compare_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/merges","archive_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/downloads","issues_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/issues{/number}","pulls_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/pulls{/number}","milestones_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/milestones{/number}","notifications_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/labels{/name}","releases_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/releases{/id}","deployments_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/deployments","created_at":"2018-02-25T17:18:23Z","updated_at":"2018-02-25T17:18:23Z","pushed_at":"2018-03-04T05:50:58Z","git_url":"git://github.com/Spring2018-ECE160/hw6-hw6-richard.git","ssh_url":"git@github.com:Spring2018-ECE160/hw6-hw6-richard.git","clone_url":"https://github.com/Spring2018-ECE160/hw6-hw6-richard.git","svn_url":"https://github.com/Spring2018-ECE160/hw6-hw6-richard","homepage":null,"size":34,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Spring2018-ECE160:master","ref":"master","sha":"df2fcba787e4b433e8c6e575025667a6c1948389","user":{"login":"Spring2018-ECE160","id":35201851,"avatar_url":"https://avatars1.githubusercontent.com/u/35201851?v=4","gravatar_id":"","url":"https://api.github.com/users/Spring2018-ECE160","html_url":"https://github.com/Spring2018-ECE160","followers_url":"https://api.github.com/users/Spring2018-ECE160/followers","following_url":"https://api.github.com/users/Spring2018-ECE160/following{/other_user}","gists_url":"https://api.github.com/users/Spring2018-ECE160/gists{/gist_id}","starred_url":"https://api.github.com/users/Spring2018-ECE160/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Spring2018-ECE160/subscriptions","organizations_url":"https://api.github.com/users/Spring2018-ECE160/orgs","repos_url":"https://api.github.com/users/Spring2018-ECE160/repos","events_url":"https://api.github.com/users/Spring2018-ECE160/events{/privacy}","received_events_url":"https://api.github.com/users/Spring2018-ECE160/received_events","type":"Organization","site_admin":false},"repo":{"id":122857973,"name":"hw6-hw6-richard","full_name":"Spring2018-ECE160/hw6-hw6-richard","owner":{"login":"Spring2018-ECE160","id":35201851,"avatar_url":"https://avatars1.githubusercontent.com/u/35201851?v=4","gravatar_id":"","url":"https://api.github.com/users/Spring2018-ECE160","html_url":"https://github.com/Spring2018-ECE160","followers_url":"https://api.github.com/users/Spring2018-ECE160/followers","following_url":"https://api.github.com/users/Spring2018-ECE160/following{/other_user}","gists_url":"https://api.github.com/users/Spring2018-ECE160/gists{/gist_id}","starred_url":"https://api.github.com/users/Spring2018-ECE160/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Spring2018-ECE160/subscriptions","organizations_url":"https://api.github.com/users/Spring2018-ECE160/orgs","repos_url":"https://api.github.com/users/Spring2018-ECE160/repos","events_url":"https://api.github.com/users/Spring2018-ECE160/events{/privacy}","received_events_url":"https://api.github.com/users/Spring2018-ECE160/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Spring2018-ECE160/hw6-hw6-richard","description":"hw6-hw6-richard created by GitHub Classroom","fork":false,"url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard","forks_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/forks","keys_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/teams","hooks_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/hooks","issue_events_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/issues/events{/number}","events_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/events","assignees_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/assignees{/user}","branches_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/branches{/branch}","tags_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/tags","blobs_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/git/refs{/sha}","trees_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/statuses/{sha}","languages_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/languages","stargazers_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/stargazers","contributors_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/contributors","subscribers_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/subscribers","subscription_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/subscription","commits_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/commits{/sha}","git_commits_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/git/commits{/sha}","comments_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/comments{/number}","issue_comment_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/issues/comments{/number}","contents_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/contents/{+path}","compare_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/merges","archive_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/downloads","issues_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/issues{/number}","pulls_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/pulls{/number}","milestones_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/milestones{/number}","notifications_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/labels{/name}","releases_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/releases{/id}","deployments_url":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/deployments","created_at":"2018-02-25T17:18:23Z","updated_at":"2018-02-25T17:18:23Z","pushed_at":"2018-03-04T05:50:58Z","git_url":"git://github.com/Spring2018-ECE160/hw6-hw6-richard.git","ssh_url":"git@github.com:Spring2018-ECE160/hw6-hw6-richard.git","clone_url":"https://github.com/Spring2018-ECE160/hw6-hw6-richard.git","svn_url":"https://github.com/Spring2018-ECE160/hw6-hw6-richard","homepage":null,"size":34,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/pulls/1"},"html":{"href":"https://github.com/Spring2018-ECE160/hw6-hw6-richard/pull/1"},"issue":{"href":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/issues/1"},"comments":{"href":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/Spring2018-ECE160/hw6-hw6-richard/statuses/7d77b6b43ce673cbd478e323802fdb0c89f7d2d3"}},"author_association":"NONE"}}
{"actor":{"display_login":"hong3cooper"}}