Answer & Solution
Answer: Option C
No explanation is given for this question Let's Discuss on Board
#include <stdio.h>
#include<iostream>
using namespace std;
int main ()
{
int array[] = {0, 2, 4, 6, 7, 5, 3};
int n, result = 0;
for (n = 0; n < 8; n++)
{
result += array[n];
}
cout << result;
return 0;
}
#include <iostream>
#include <string>
using namespace std;
int main ()
{
string str ("Steve jobs");
unsigned long int found = str.find_first_of("aeiou");
while (found != string :: npos)
{
str[found] = '*';
found = str.find_first_of("aeiou", found + 1);
}
cout << str << '\n';
return 0;
}