0% found this document useful (0 votes)
263 views

Questions and Answers Data Types and Directives 8051 C++ C

This document contains questions and answers about data types and directives in assembly language. It includes questions about the use of the DB directive to define 8-bit data, which data types are integers, the size of decimal data type, the ORG and END directives, fundamental data types like integer and floating point, true/false statements about object and value types, ranges and sizes of data types like short, int and long, which data type does not store sign, details about the double data type, and that the boolean data type only accepts true or false values.

Uploaded by

Tanuj Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
263 views

Questions and Answers Data Types and Directives 8051 C++ C

This document contains questions and answers about data types and directives in assembly language. It includes questions about the use of the DB directive to define 8-bit data, which data types are integers, the size of decimal data type, the ORG and END directives, fundamental data types like integer and floating point, true/false statements about object and value types, ranges and sizes of data types like short, int and long, which data type does not store sign, details about the double data type, and that the boolean data type only accepts true or false values.

Uploaded by

Tanuj Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

QUESTIONS AND

ANSWERS DATA TYPES


AND DIRECTIVES
Submitted By: TANUJ KUMAR
SID: 12104025
Submitted to: PROF. TILAK THAKUR

What is the use of define byte?


The DB directive is the most widely used data directive
in the assembler. It is used to define the 8-bit data.
When DB is used to define data, the numbers can be in
decimal, binary, hex, or ASCII formats. For decimal, the
D after the decimal number is optional, but using B
(binary) and H (hexadecimal) for the others is
required.

Which of the following is NOT an


Integer?
A. Char
B. Byte
C. Integer
D. Short
E. Long

Ans. A

What is the size of a Decimal?


A. 4 byte
B. 8 byte
C. 16 byte
D. 32 byte

Ans. C

The ______ directive is used to


indicate the beginning of the
address. ______ directive indicates to
the assembler the end of the source
(asm) file.
Ans. ORG (Origin) directive
END directive

The fundamental (or built-in or


primitive) data types are:
Integer
Floating Point
_________
_________
Bool

Ans. 1. Character
2. Double

Which of the following statements are


correct?
1. We can assign values of any type to variables of type object.
2. When a variable of a value type is converted to object, it is said
to be unboxed.
3. When a variable of type object is converted to a value type, it is
said to be boxed.
4. Boolean variable cannot have a value ofnull.
5. When a value type is boxed, an entirely new object must be
allocated and constructed.
Ans. 1,5

TYPE

SIZE
(bytes)

RANGE

SHORT

-32768 to 32767

UNSIGNED SHORT

0 to 65,535

SIGNED SHORT

Same as short

INT

-32768 to 32767

UNSIGNED INT

0 to 65,535

SIGNED INT

Same as int

LONG

-2,147,483,648 TO
2,147,483,647

UNSIGNED LONG

0 to 4,294,967,295

SIGNED LONG

Same as long

Ans.
2 bytes
Range -32768 to
32767

Which of the following does not


store a sign?
A. Short

B. Integer
C. Long
D. Byte
E.

Single

Ans. D

______ data type is similar to the floatingpoint data type but it has an even greater
range extending up to 10308
Also write its syntax?

Ans. Double data type


Syntax= double variable-name;

_______ data type will only accept


two values: true(1) or false(0).

Ans. Boolean Type (bool)

You might also like