Languages-C & C Plus Plus [3i Infotech Placement]: Sample Questions 354 - 354 of 354

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 354

C & C Plus Plus
Edit

Describe in Detail

Essay▾

What is namespace?

Explanation

Understanding of Namespace
  • Namespace is declarative region providing a scope to the identifiers inside.
  • Namespace break code into logical groups to prevent name collisions especially when code includes multiple libraries.

Define Namespace

namespace namespace_name

{

// code declarations

}

To access namespace of other function prepend (::) the namespace as follows:

Name:: code; // code could be variable or function.

Developed by: