Open a file stream, iterate through using isupper
isupper - C++ Reference
PS I had to laugh. I didn't take me long to forget almost everything I knew about c.
EDIT: bit more info
Code:
file = fopen
do
int = getc
if isupper int
counter++
while condition
I will leave you to fill in the blanks.