Searching for "namespace"

Q:

What is XML Namespace?

Answer

An XSL sheet or a document may have duplicate elements and attributes. Therefore, the XML namespaces define a way to distinguish between duplicate element types and attribute names.


An XML namespace is a collection of element type and attribute names. It is a URI due to which any element type or attribute name in an XML namespace can be uniquely identified. 


It consists of two parts : the name of the XML namespace and the local name.


e.g.: xmlns: h=”https://www.abc.com”


After this, you can write


<h:table>


……..


</h:table>


to associate the table with the declared namespace. 

Report Error

View answer Workspace Report Error Discuss

Subject: Web Technology

Q:

Which namespaces in .NET are used for XML?

Answer

The System.xml.dll is the real physical file, which contains the XML implementation. Some of the other namespaces that allow .NET to use XML are as follows:


    


      =>  System.Xml

      =>  System.Xml.Schema

      =>  System.Xml.XPath

      => System.Xml.Xsl

Report Error

View answer Workspace Report Error Discuss

Subject: .NET

Q:

In which namespace, all .NET collection classes are contained?

Answer

The System.Collections namespace contains all the collection classes.

Report Error

View answer Workspace Report Error Discuss

Subject: .NET

Q:

What is the general syntax for accessing the namespace variable?

A) namespaceid::operator B) namespace,operator
C) namespace#operator D) none of the mentioned
 
Answer & Explanation Answer: A) namespaceid::operator

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: C++

Q:

What is the use of Namespace?

A) To encapsulate the data B) To structure a program into logical units.
C) Both a and b D) none of these
 
Answer & Explanation Answer: B) To structure a program into logical units.

Explanation:

The main aim of the namespace is to understand the logical units of the program and to make the program so robust.

Report Error

View Answer Report Error Discuss

Filed Under: C++

Q:

What is the output of this program ?

       #include
        using namespace std;
        int n(char, int);
        int (*p) (char, int) = n;
        int main()
        {
            (*p)('d', 9);
            p(10, 9);
            return 0;
        }
        int n(char c, int i)
        {
            cout << c <<  i;
            return 0;
        }

A) d99 B) d9d9
C) d9 D) compile time error
 
Answer & Explanation Answer: A) d99

Explanation:

In this program, we have declared the values as integer instead of character, So it is printing as d99 but it will not arise an error.

Report Error

View Answer Report Error Discuss

Filed Under: C++

Q:

What is the output of this program?

#include
        using namespace std;
        void fun(int x, int y)
        {
            x = 20;
            y = 10;
        }
        int main()
        {
            int x = 10;
            fun(x, x);
            cout << x;
            return 0;
        }

A) 10 B) 20
C) compile time error D) none of these
 
Answer & Explanation Answer: A) 10

Explanation:

In this program, we called by value so the value will not be changed, So the output is 10

Report Error

View Answer Report Error Discuss

Filed Under: C++

Q:

What is the output of this program?

#include
        using namespace std;
        struct sec {
            int a;
            char b;
        };
        int main()
        {
            struct sec s ={25,50};
            struct sec *ps =(struct sec *)&s;
            cout << ps->a << ps->b;
            return 0;
        }

A) 252 B) 253
C) 254 D) 262
 
Answer & Explanation Answer: A) 252

Explanation:

In this program, We are dividing the values of a and b, printing it.

Report Error

View Answer Report Error Discuss

Filed Under: C++