$\text{while(*A++)}$ tempted me to try the below code examples.
Note: $\text{A}$ is not an array but a pointer as $\text{A++}$ cannot be done with arrays because $\text{A++}$ is nothing but $\text{A=A+1}$ and in arrays value of $\text{A}$ is constant. But the same can be done with Pointers.
#include <stdio.h>
int main()
{
int b[] = {3,2,0,1};
int *A = b;
//*A++ will be treated as *(A++) but increment of A will happen after using *A for condition check
while(*A++){
printf("%d\n",*A);
}
return 0;
}
Output:
2
0
#include <stdio.h>
int main()
{
int b[] = {3,2,0,1};
int *A = b;
//value of A[0] is checked for condition and then A[0] is incremented by 1, always checking A[0]
while((*A)++){
printf("%d\n",*A);
}
return 0;
}
Output:
4
5
6
7
.
.
.