Answer:
Length of char array: sizeof(arr)
Length of a string object: myString.length()
Explanation:
The sizeof approach is generally not recommended, since this information is lost as soon as you pass the array to a function, because then it becomes a pointer to the first element.
I’m pretty sure it would be an insert tab
Answer:
C, Both of these.
Explanation:
You can take notes either way. It's just your preference. Hope this helps :)
Answer:
<em><u>use</u></em><em><u> </u></em><em><u>the</u></em><em><u> </u></em><em><u>ope</u></em><em><u>ning</u></em><em><u> </u></em><em><u>and</u></em><em><u> </u></em><em><u>cl</u></em><em><u>osing</u></em><em><u> </u></em><em><u>tags</u></em><em><u> </u></em>
<em><u>[</u></em><em><u>Tex]</u></em><em><u> </u></em><em><u>[</u></em><em><u>\</u></em><em><u>t</u></em><em><u>e</u></em><em><u>x</u></em><em><u>]</u></em><em><u> </u></em><em><u>ok</u></em>
<u>Explanation:</u>
Hey there! you need not to panic about it ,your program didn't have Driver program i.e main program! the correct & working code is given below:
// C++ program to count even digits in a given number .
#include <iostream>
using namespace std;
// Function to count digits
int countEven(int n)
{
int even_count = 0;
while (n > 0)
{
int rem = n % 10;
if (rem % 2 == 0)
even_count++;
n = n / 10;
}
cout << "Even count : "
<< even_count;
if (even_count % 2 == 0 )
return 1;
else
return 0;
}
// Driver Code
int main()
{
int n;
std::cin >>n;
int t = countEven(n);
return 0;
}