https://wiki.cdot.senecacollege.ca/w/index.php?title=Test_1&feed=atom&action=history Test 1 - Revision history 2021-08-03T08:07:10Z Revision history for this page on the wiki MediaWiki 1.30.0 https://wiki.cdot.senecacollege.ca/w/index.php?title=Test_1&diff=101320&oldid=prev Kabeer Rashid: Created page with '* Q1. When moving though an array we use the size to move through byte by byte but when we pass two values or a value we are able to do 'value++'. Why in example 1 we use size an…' 2013-10-24T00:39:49Z <p>Created page with &#039;* Q1. When moving though an array we use the size to move through byte by byte but when we pass two values or a value we are able to do &#039;value++&#039;. Why in example 1 we use size an…&#039;</p> <p><b>New page</b></p><div>* Q1. When moving though an array we use the size to move through byte by byte but when we pass two values or a value we are able to do 'value++'. Why in example 1 we use size and in example 2 we use '++', when both are .<br /> Example 1.<br /> n = sum(a, 11, sizeof(int), isEven, &amp;e); // Where a is an array<br /> int sum(void* x, int n, int size, bool (*f)(void*, void*), void* result)<br /> {...<br /> ptrcharx = ptrcharx + size;<br /> ...}<br /> Example 2.<br /> b = exchange(&amp;x, &amp;y, sizeof(int), (int(*)(void *, void *))ig); // x =4, y =3<br /> int exchange(void *a, void *b, int n, int(*f)(void *, void*))<br /> {...<br /> a1 = (char*)a;<br /> a1++;<br /> ...<br /> }</div> Kabeer Rashid