I want to know the answer to the question about writing XML. | Community
Skip to main content
New Participant
Dec 19, 2017 7:02 AM UTC
Solved

I want to know the answer to the question about writing XML.

I want to know the answer to the question below.

Which XML element correctly defines a 32-bit integer field?

A. <attribute name="count" label="Count" type="integer" />

B. <attribute name="count" label="Count" type="long" />

C. <attribute name="count" label="Count" type="integer" length="32" />

D. <attribute name="count" label="Count" type="long" length="32" />

Thank you for your help.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Adhiyan
AdhiyanAccepted solution
Employee
Dec 19, 2017 8:01 AM UTC

Hello Rama,

It should not be option D as the attribute length="32" does not have any logical value here .

The highest limit of a 32-bit integer is 2,147,483,647 which is 10 digits long. so as it is , you cannot have a 32-bit integer more than 10 digits long , which in turn makes the length attribute useless in case of integer 32-bit columns.

So when we are defining type="long" , we are limiting the length to 10 automatically .

Although , it would not cause any issues in operations but logically the most appropriate option is B .

Regards,

Adhiyan

5 replies

Employee
Dec 19, 2017 8:06 AM UTC

Thanks Adhiyan!

Translate
Adhiyan
AdhiyanAccepted solution
Employee
Dec 19, 2017 8:01 AM UTC

Hello Rama,

It should not be option D as the attribute length="32" does not have any logical value here .

The highest limit of a 32-bit integer is 2,147,483,647 which is 10 digits long. so as it is , you cannot have a 32-bit integer more than 10 digits long , which in turn makes the length attribute useless in case of integer 32-bit columns.

So when we are defining type="long" , we are limiting the length to 10 automatically .

Although , it would not cause any issues in operations but logically the most appropriate option is B .

Regards,

Adhiyan

Translate
Employee
Dec 19, 2017 7:52 AM UTC

It should be option D.

Translate
New Participant
Dec 19, 2017 7:28 AM UTC

Is not it option D?

Translate
vraghav
Employee
Dec 19, 2017 7:12 AM UTC

Option B

Translate