Answer to Question #342883 in C++ for Padi

Question #342883

Find the error(s) in each of the following program segments and explain how the error(s) can be corrected: 

(iv) void aFunction(float a) { float a; cout << a << endl; }


1
Expert's answer
2022-05-23T16:24:57-0400
#include <iostream>
using namespace std;
 
void aFunction(float a) {

//   error:  float a;

cout << a << endl;
}
 
int main() {
    aFunction(5.57) ;
    return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS