10 and 11 For the code, given input cat nine int mystery2( char s(] ); //prototy
ID: 3763131 • Letter: 1
Question
10 and 11 For the code, given input cat nine int mystery2( char s(] ); //prototype Int main() { char word 1(20], word2[20]; cout " enter 2 words dn word1 word2; cout mystery2( wordl ) endl mystery2( word2) endl; return 0; )//end main // Function definition int mystery2( char s(] ) { int i; for (I -1; sJ+4111* ''; ) return i; What Is the output ? To open a file for input, wc need to use an object of type istream ostream ifstream ofstream Which of the following function prototypes is valid bool fun (a, b); void fun( char a, b); bool fun (char a, char b); void fun (char &a;, &b;);
Explanation / Answer
10.
The program output is 3 and 4.
This program shows the no of letters in a word. So cat =3 and nine=4.
11. 1. To open a file we need ifstream object.
2. Correct Answers are c and d.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.