The namespace is a logical division of the code which is designed to stop the naming conflict.
It defines the scope where the identifiers such as variables, class, functions are declared.
For example: if there are two functions exist with the same name such as add(). To prevent this ambiguity, the namespace is used. Functions are declared in different namespaces.
C++ consists of a standard namespace, i.e., std which contains inbuilt classes and functions. So, by using the statement “using namespace std;” includes the namespace “std” in our program.
Regards,
Nitesh Bavishiya