Zero in int array treat as null not digit
1) how can i use as digit
2) when i remove zero then it print four digit in array and print some garbage value, how remove this remedies
print when int array does not contain zeroCode:#include<iostream> using namespace std; void check(int *t){ while(*t != NULL){ cout << *t++ << endl; t++; } } int main(){ int a[] = {5,4,7,8,0}; check(a); }
Code:5 4 7 8 4636772 21473443 4009792 2293664 4198619 1 4013768 4009224 4718596 2293652 -1 2293648