argv[0][3]6
'i'
argv[0][3]6
'i'
argv[0] + 1
address of second character in mkdir
*(argv[1] + 1)
'v'
argv + 1
0x1008
argv[0]
address of first character in 'mkdir'
void product_and_sum(int* input, int length, int* product,int* sum) {}5
``` void product_and_sum(int input, int length, int product, int* sum) { int temp_product = 1; int temp_sum = 0;
for (int i = 0; i < length; i++) { temp_product = input; temp_sum += *input; input++; }
sum = temp_sum; product = temp_product; }```
Why do we need an output parameter? Why can’t we just return an array we create in strcpy?
If we initialize an array and attempt to return it, the array will be located on the stack frame of the function and will not be safely accessible by the user once it is returned outside of the function's stack frame.
How is the caller able to see the changes in dest if C is pass-by-value?
Changes can be seen if we are dereferencing dest, such as when we set dest = src. When we are not dereferencing dest, such as dest++, we are only modifying the local pointer in order to work with its contents, and such modifications cannot be seen by the caller.
it isthe tools and artifacts, and/or the learning environments that must be reorganized in waysto encourage deep learning
It is more important to focus on the strengths, experiences, and interests of a student rather than forcing them to bottle up what makes up their identity.