What is the error in the following code? Why is this wrong?
```
int f(int x)
{
int x;
// code for function body
}
```
The declaration of the variable x in the function body will be flagged by the compiler as a multiple declaration of the variable Such an attempt at (re)declaring a parameter violates the C++ rule that all identifiers be declared exactly once, prior to use. The g++ compiler gives the following (somewhat cryptic) error messages. (The -fsyntax-only option is to cause checking the programs syntax, but not generate any other files in the event that there are no errors. Most compilers have a similar option.)
g++ -fsyntax-only Problem10.cc
Problem10.cc: In function `int f(int)':
Problem10.cc:3: declaration of `x' shadows a parameter
Compilation exited abnormally with code 1 at Mon Jul 10 07:10:07
You might also like to view...
Handouts should contain not more than two slides per page.
Answer the following statement true (T) or false (F)
________ is a variety of technologies for managing computer resources by providing an abstraction layer between the software and the physical hardware.
A) Virtual machine B) Open Platform for NFV C) Virtualization D) Business support system