IHYPRESS.NET > C PROGRAMMING
> 06. Functions II (Pointers)
A function with two results
This program shows a function that generates two results. One result is returned, the other accessed from the main via an address.
function: using pointer arguments
This function returns nothing but will change the value of the variable in the calling function's memory area.
Prime numbers (by reference)
A function that determines if a number is prime or not. The function returs 1 if prime, 0 if not. In addition, the function will "return" the value of one of the divisors.
function: two results by reference
A function that takes in an integer number and "returns" both twice the number and three times the number.
function: multiple results by reference
A function that takes a real number and splits it into three parts: a sign (character), a whole part (integer) and a fraction (double).
function: two results from a scanf
A simple addition reader/parser for 2 doubles.
function: using recursion
A function that multiplies two integers without using the multiplication (*) operator.
COPYRIGHT © 2019 IHYPRESS.NET. A DIVISION OF IHY PRESS, KIRKLAND, WA 98083 USA. ALL RIGHTS RESERVED.