That would come at the cost of a comparison so I think it would depend on whether it’s worth it or not, i.e. is that realistically possible in the program and if so how often would that occur. If it’s possible and happens reasonably often that could be a good optimization.
Nice video, thank you Kevin for you efforts. On transmitting data we verify if corruption occurred or not by using various methods such as checksum. I thought about the idea of varying the algorithm for generating the checksum for both arrays, what is your take on this method Kevin? Thank you.
We can’t really determine the length of the arrays in the function in C, as all the function really gets when they are passed is a pointer, in other words the memory address of the first element. With strings we could search for the null terminator to determine the length, but with arrays we can’t do that.
Your videos are unique in terms of teaching quality....will you make a Java playlist anytime soon?
You should check if both pointers point to the same address because that can save you from doing a for loop.
That would come at the cost of a comparison so I think it would depend on whether it’s worth it or not, i.e. is that realistically possible in the program and if so how often would that occur. If it’s possible and happens reasonably often that could be a good optimization.
Nice video, thank you Kevin for you efforts. On transmitting data we verify if corruption occurred or not by using various methods such as checksum. I thought about the idea of varying the algorithm for generating the checksum for both arrays, what is your take on this method Kevin? Thank you.
That seems like an OK idea to me. :-)
I hope u can give me tutorial how to deal with images without 3rd party library. Especially for read jpg pixel information..
Is it easy to determine the length of both arrays within the function?
We can’t really determine the length of the arrays in the function in C, as all the function really gets when they are passed is a pointer, in other words the memory address of the first element. With strings we could search for the null terminator to determine the length, but with arrays we can’t do that.
Which IDE are you Using ?
Xcode on MacOS. :-)