Problem:
Hello All,
I am a new student in C++ programming. I started learning programming out of my own curiosity. One of my friends told me that C++ is easy to pick up and I stick on his words. I am helping my friends’ and different websites help to learn new things every day. Today, I have got a new problem to solve. The problem is asking me to find all the number of elements in an array. Let say, I have an array of
int array [] = {1,2,3,4,5,6,7,8,9,10};
The program should count all the elements and print the result 10 as there are ten elements in my array.
How can I solve this problem? I am looking forward to having a solution from you. Thanks for your help, guys.