Assume "answer" is return value > 0 and i want to save
that value and kept doing it until i finish check all 3 number...then i retreat
and use computation... please help my code...if pointer is the way to go?
Will pointer will do my trick? What is the rule of thumb when to use pointer? what pointer is good for?
I have a function definition that return back caller function...and action take place..and I have a for loop kept do until equal to 3... and everytime it return back a number...and kept doing it until equal 3. i want to save number every time return back caller function (testNibble) and kept doing it until = 3. below code is inside for loop
Code:
for (nibble = 0; nibble <=3; nibble++)
{
if (choice =='f')
answer = testNibble(number, nibble, value); /* call function */
else if(choice =='r')
answer = replaceNibble(number, nibble, value, readinNewVal, item, out); /* call function */
if ( answer > 0)
{
c = &answer;
*c = answer;
c = (answer | number );
if (nibble >=3)
{
c = (answer | number );
}
}
}