KEMBAR78
CSA2 Practical Chapter1 Sample | PDF
0% found this document useful (0 votes)
5 views3 pages

CSA2 Practical Chapter1 Sample

Chapter 1 covers fundamental concepts of data representation, including definitions of built-in and user-defined data types, the need for user-defined types, and examples of non-composite data types. It also discusses pointers, composite data types, record types, and operations on set data types, along with file types and their characteristics. Additionally, the chapter explains floating point representation, mantissa normalization, and the implications of bit size on range and precision.

Uploaded by

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

CSA2 Practical Chapter1 Sample

Chapter 1 covers fundamental concepts of data representation, including definitions of built-in and user-defined data types, the need for user-defined types, and examples of non-composite data types. It also discusses pointers, composite data types, record types, and operations on set data types, along with file types and their characteristics. Additionally, the chapter explains floating point representation, mantissa normalization, and the implications of bit size on range and precision.

Uploaded by

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

Chapter 1: Data Representation

1. Define the following:

- Built-in data type:

- User-defined data type:

2. Why might a programmer need to use a user-defined data type?

3. Identify and describe two non-composite data types with an example each.

4. Given the declaration TYPE Week: {sun, mon, tue, wed, thu, fri, sat}, write:

- A variable declaration using this type.

- A valid assignment.

5. Describe the purpose and usage of a pointer in programming. Include an example showing:

- Pointer declaration

- Address assignment

- Dereferencing

6. What is a composite data type? Give two examples.

7. Design a record type `Person` with fields: Name, Age, IsStudent.

8. In a class definition, what's the difference between fields and functions?

9. Describe three operations that can be performed on a set data type.


10. Define a set `EvenNumbers` using the correct syntax.

11. Differentiate between serial, sequential, and direct-access files.

12. For each file type (serial, sequential, direct), give:

- A real-world example

- Access method used

- Advantages and limitations

13. Explain the concept of a hashing function and overflow handling.

14. Convert 3.5 to floating point with 8-bit mantissa and 8-bit exponent.

15. Convert -2.5 to floating point with 12-bit mantissa and 4-bit exponent.

16. Why is mantissa normalization important?

17. What happens when the number of bits for the mantissa is too small?

18. How are range and precision affected by mantissa and exponent size?

19. Given mantissa = 011100000, exponent = 00000010, what number is represented?


20. List two reasons normalized mantissas are preferred.

You might also like