What is Namespace?

Answers were Sorted based on User's Feedback



What is Namespace?..

Answer / saroj das ,balsore

a namespace is a simply declarative region the main purpose
is is to localize the names of identifiers to avoid name
name collisions .

Is This Answer Correct ?    9 Yes 2 No

What is Namespace?..

Answer / mohamed shafi k k

a namespace is a simply declarative region the main purpose
is to localize the names of identifiers to avoid name
name collisions .

Is This Answer Correct ?    5 Yes 0 No

What is Namespace?..

Answer / kishore

A namespace is a simply declarative region the main purpose
is to localize the names of idetifies.

Is This Answer Correct ?    4 Yes 2 No

What is Namespace?..

Answer / satheeshkumar

a namespace is a simply declarative region the main purpose
is is to localize the names of identifiers to avoid name
name collisions .

Is This Answer Correct ?    4 Yes 2 No

What is Namespace?..

Answer / sandeep mannarakkal

Name space is a global declarative region where name are uniquely getting identified.
it is possible to insert 1) functions 2) variables 3) class/Structure 4) namespaces inside namespace.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

Is there any difference between int [] a and int a [] in c++?

0 Answers  


write a C++ programming using for loop: * * * * * * * * * *

4 Answers   TCS,


Ask to write virtual base class code?

0 Answers   Satyam,


Board Coloring Problem Description In this problem you are given a board in which some of the elements are placed as shown in diagram below. Each element represents a color. Fill the other elements in the board, such that none of the adjacent elements (vertically, horizontally and diagonally) should be of the same color. Find out the minimum number of colors that should be used to fill the blank spaces in the board, so that the above condition is met. Color representation is -: 0, 1, 2, 3, 4, 5, 6, 7……………………. There is sample board: For Example: Given Board : Matrix representation of board is : [ _ 1 _ _ ] [ 2 _ _ _ ] [ _ _ 2 _ ] [ 2 _ _ _ ] here blank space is represented by '_' . Minimum colors to fill this board (given in the picture)is 4. Instruction to work with Open PBT Client: Specify the work directory path in the 'Work directory Path' field. The path should correspond to your solution Work directory. Download the support files by clicking the Get Dev Files. You will find the problem directories containing: problem.h file problem.c file in your project directory. Code the solution in.c file inside the problem directory All required files will be downloaded to your work directory. Creating additional files is strongly discouraged. Step 1: In your Solution File: Implement your logic in function int color(char board[4][4]) char board[4][4]board is 2 dimensional matrix of order M X M where M = 4. You can create more functions if required, but those functions should be in the same file. Step 2: In your solution keep in mind the following constraints. In this problem you have to write a program that finds the minimum number of colors needed to fill a board in which some of the elements are placed in advance. Function color() will take 2 dimension board as a input. Function color() returns the minimum number of colors that could fill the board meeting the given condition. Board is a 2 dimensional of M X M where M = 4 else return 0 Fill the other elements in the board, such that none of the adjacent elements (vertically, horizontally and diagonally) should be of the same color. The Prototype of the function is int color(char board[4][4]) This function takes following arguments. board is 2 dimensional matrix of order M X M where M = 4. This function returns minimum no of color by which board can be filled. The constraints are: Board is a 2 dimensional of M X M where M = 4 else return 0 Fill the other elements in the board, such that none of the adjacent elements (vertically, horizontally and diagonally) should be of the same color. Example 1 Input { 2 0 _ 1 } { _ 1 _ _ } { _ 2 _ 0 } { _ _ _ 1 } Output 5 Explanation: We need a minimum 5 different colors to complete the board. Example 2 Input { 2 0 _ 1 3} { _ 1 _ _ 2} { _ 2 _ 0 1} { _ _ _ 1 2} { _ _ _ _ 0} Output 0 Explanation: Size of the board is greater than 4X4. Example 3 Input { _ 0 } { 1 _ } Output 0 Explanation: Size of the board is less than 4X4. For C solutions Header File : boardcoloring.h Function Name : int color(char board1[4][4]) File Name : boardcoloring.c For C++ solutions Header File : boardcoloring.h Class Name : BoardColoring Function Name : int color(char board1[4][4]) File Name : boardcoloring.c

0 Answers   Infosys,


What are the different operators in C++?

3 Answers   HP,






an operation between an integer and real always yeilds a) integer result b) real result c) float result

0 Answers  


write program for palindrome

81 Answers   Amazon, Aricent, CSC, GE, HCL, Infosys, Syntel, Temenos, Wipro,


Is it legal in c++ to overload operator++ so that it decrements a value in your class?

0 Answers  


We all know that a const variable needs to be initialized at the time of declaration. Then how come the program given below runs properly even when we have not initialized p?

0 Answers  


Can we use clrscr in c++?

0 Answers  


Out of fgets() and gets() which function is safe to use and why?

0 Answers  


What is the use of volatile keyword in c++? Give an example.

1 Answers  


Categories