First Upload
This commit is contained in:
35
9/ex1.c
Normal file
35
9/ex1.c
Normal file
@@ -0,0 +1,35 @@
|
||||
#include "IdanStringLib.h"
|
||||
#include "IdanLib.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#define STRING_MAX_SIZE 256
|
||||
|
||||
//---------------------------------------------------------------------------------------
|
||||
// Exercise 1
|
||||
// ----------
|
||||
//
|
||||
// General : The program deletes a string in a string till the are no more.
|
||||
//
|
||||
// Input : 2 string.
|
||||
//
|
||||
// Process : The program checks if the is the string that needs too be deleted if there
|
||||
// is delete else stop and print how many times it was deleted and the new
|
||||
// string.
|
||||
//
|
||||
// Output : The new string and how many times it deleted.
|
||||
//
|
||||
//---------------------------------------------------------------------------------------
|
||||
// Programmer : Cohen Idan
|
||||
// Student No : 211675038
|
||||
// Date : 04.11.2019
|
||||
//---------------------------------------------------------------------------------------
|
||||
void main(void)
|
||||
{
|
||||
typedef char string[STRING_MAX_SIZE];
|
||||
string str1 = "";
|
||||
string str2 = "";
|
||||
|
||||
printf("Count: %u\n", CountStringBInStringA(str1, str2));
|
||||
RemoveAllStringBFromStringA(str1, str2);
|
||||
printf("The text: %s\n", str1);
|
||||
}
|
||||
Reference in New Issue
Block a user