2 threads going to use the same func()
.
The 2 threads should be mutually exclusive. How do I get it to work properly?
(output should be "abcdeabcde")
char arr[] = "ABCDE";
int len = 5;
void func(){
for(int i = 0; i <len;i++)
printf("%c,arr[i]);
}