In the Code below:
char data[128] = "Just A Test \0";
char *cTest2 = data;
char *cTest3 = &data[0];
What is the difference between cTest2 and cTest3? When would you use one method of initialization over the other?
There is no difference; since a decent compiler would yield the same code, which you use would be according to personal preference.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With