1. Include the standard input/output library.
2. Define the main function.
1. Declare variables: Memory_A as integer, Memory_B as float,
Memory_C as char, Memory_D as double, Memory_Str as String.
2. Print a comment to show memory state.
3. Assign the value 10 to Memory_A.
4. Assign the value 10.12345 to Memory_B.
5. Assign the character 'A' to Memory_C.
6. Assign the value 10.123456789 to Memory_D.
7. Assign the string "Anisur" to Memory_Str.
8. Print the size of Memory_A in bytes or bits.
9. Print the size of Memory_B in bytes or bits.
10. Print the size of Memory_C in bytes or bits.
11. Print the size of Memory_D in bytes or bits.
12. Print the size of Memory_Str in bytes or bits.
13. End the main function and return 0.
3. End of program.
The size of Memory of int, Memory_A = 4 Bytes or 32 bits
The size of Memory of float, Memory_B = 4 Bytes or 32 bits
The size of Memory of char, Memory_C = 1 Bytes or 8 bits
The size of Memory of double, Memory_A = 8 Bytes or 64 bits
The size of Memory of Str, Memory_Str = 10 Bytes or 80 bits
I am Md. Anisur Rahman. I have completed Cyber Security for MSCSE at United International University in 2022.I have completed PGDIT from IIT, Jahangirnagar University in 2020. I'm a Head of IT at Programming24 School.
View all posts by Md. Anisur Rahman