True because the diagonals of a rectangle are equal in lengths
true
Code example:#define bTRUE 1 #define bFALSE 0 typedef int BOOL BOOL bIsItAVowel(char cLetter); int main(void) { char cMyTestLetter = 'a'; if(bIsItAVowel(cMyTestLetter)) { /* Yep, it's a vowel. */ } else { /* Nope, it's not. */ } return 0; } BOOL bIsItAVowel( char cLetter) { switch(cLetter) { case 'a': case 'e': case 'i': case 'o': case 'u': case 'A': case 'E': case 'I': case 'O': case 'U': return bTRUE; break; default: return bFALSE; } }
Code example:/* ******************************************************************************** * FUNCTION: bIsAPrime ******************************************************************************** * AUTHORS: * Flaun * * DESCRIPTION: * Finds if a given number is a prime number. * * PARAMETERS: * uiTestNumber: An unsigned integer to test. * * RETURNS: * bTRUE or bFALSE ******************************************************************************** */ #define bTRUE 1 #define bFALSE 0 #define iNO_REMAINDER 0 #define bIS_ODD(uiNumber) ((uiNumber) & 1) typedef int BOOL BOOL bIsAPrime( unsigned int uiTestNumber) { /* 4 is the first non prime number. */ if(uiTestNumber > 3) { /* The only even prime number is 2. */ if(!bIS_ODD(uiTestNumber)) { return bFALSE; } else { /* The only numbers left to divide against are 3, 5 and 7. */ /* All numbers that are divisible by a number > 7 are divisible */ /* by a number < 8. */ unsigned int uiDivisor = 0; for(uiDivisor = 3; uiDivisor
A header file is normally used for declarations to provide an interface that can be included into a source file that wants to use the functions/variables that have been declared. If the header file contains function prototypes, it will usually have a corresponding source file that defines the functions. /* example.h */ #define bTRUE 1 #define bFALSE 0 typedef int BOOL BOOL bEvenNumber(unsigned int uiNumber); /* example.c */ #include "example.h" BOOL bEvenNumber( unsigned int uiNumber) { return (uiNumber & 1) ? bFALSE : bTRUE; }