Hey i have 2 problems that i cant fiqure out. If anyone can help me please do. thank you so much.
Given an array arr of type int, along with two int variables i and j, write some code that swaps the values of arr[i] and arr[j]. Declare any additional variables as necessary.
something like this??
[CODE] int temp;
temp = *p;
*p = *q;
*q = temp;
an int variable k,
an int array incompletes that has been declared and initialized,
an int variable nIncompletes that contains the number of elements in the array,
an int variable studentID that has been initialized, and
an int variable numberOfIncompletes,
write code that counts the number of times the value of studentID appears in incompletes and assigns this value to numberOfIncompletes.
You may use only k, incompletes, nIncompletes, studentID, and numberOfIncompletes.
I have no idea. please help