I looked at this piece of code, and I'm not sure if adding means that "a" is an array.
int main(int argc, char* argv[]){ int a[] = {1, 3, 5, 7, 9}; function(1, a+2); return 0;}
Suppose a function is already created.
In an expression (except when used with sizeof or &), the name of the array is a pointer to the first element of the array. Thus, it a+2is “pointer arithmetic” on that pointer and leads to a pointer to an element with offset 2. It is equivalent &a[2].
a+2
&a[2]
Source: https://habr.com/ru/post/1524212/More articles:What is the minimum / maximum scale of floats and doubles in Objective-C under OS X? - objective-cHow to check the cross-platform command line client? - mercurialggplot2: remove color and draw borders on line chart - rRetrieve disk memory information from multiple remote windows servers - windowsHow to add our own schedule to Kibana? - elasticsearchRemoving jQLite (mini-jQuery) from Angularjs - javascriptanjularjs push value for nested ng-repeat - angularjsRuby on Rails using sorting on each of them - ruby | fooobar.comUPDATE operation conflicts with FOREIGN KEY constraint in ASP.NET MVC4 - sqlSpring Загрузка /Spring Данные import.sql не запускаются Spring -Boot-1.0.0.RC1 - springAll Articles