First Upload

This commit is contained in:
2022-02-25 15:33:16 +02:00
commit 0c74d10f0d
295 changed files with 74784 additions and 0 deletions

32
22- recorstion2/ex5.c Normal file
View File

@@ -0,0 +1,32 @@
#include "General.h"
#define ASCII_A 'A'
//---------------------------------------------------------------------------------------
// CountAChar
// ----------
//
// General : Count the amount of characters that are A in string.
//
// Parameters :
// str - a pointer of string (char *)
//
// Return value : Count the amount of characters that are A in string (unsigned int).
//
//---------------------------------------------------------------------------------------
// Programmer : Cohen Idan
// Student No : 211675038
// Date : 30.12.2019
//---------------------------------------------------------------------------------------
unsigned int CountAChar(char * str)
{
if (!(*str))
return (ZERO);
else
return (CountAChar(++str) * ((*str) == ASCII_A));
}
void main(void)
{
}