Q:

What is a namespace in c++?

0

What is a namespace?

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Answer:

A namespace is a declarative region that provides a scope to the identifiers (the names of types, functions, variables, etc) inside it. Namespaces are used to organize code into logical groups and to prevent name collisions that can occur especially when your codebase includes multiple libraries.

Syntax of the namespace:

namespace Name_namespace
{
  named_entities
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C++ Interview Questions and Answers(2022)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
How to use namespace in C++?... >>
<< What do you mean by call by value and call by refe...