sizeof is operator in C/C++ language and is calculated in compile time.
And yes, you can use it everywhere where you need compile-time constant, like array size.
BTW, parenteses are unnessesary: char testCh[sizeofint]
As Smac89 pointed out, you do need parentheses when you are applying sizeof to types. You can use it without them on variables: