0

Hi everyone, I have a problam with data types which are using in C++. I am so confuce about int,float,double,strings,etc; And numbers of bits that related to each data type. Please anyone help me to solve my problam.

6
Contributors
5
Replies
6
Views
10 Years
Discussion Span
Last Post by Nick Evan
0

Hi everyone, I have a problam with data types which are using in C++. I am so confuce about int,float,double,strings,etc; And numbers of bits that related to each data type. Please anyone help me to solve my problam.

The number of bits depend on the compiler. I'm sorry, but I really can't give a better answer without a more detailed question.

0

if we suppose you are using VC++ 7.0 or 8.0, ints and floats are often 32-bit, chars 8-bit, and doubles are usually 64-bit.

strings is not a base type.

0

Write a program the outputs sizeof([I]type)[/I] to display the size of each type in bytes. Then multiply by 8 for bits.

For example sizeof(char) will probably output 1.

0

Am very new to programming but what are these data types associated with, like

chars = letters such as a, b, c
strings = words such as boy, cat, jill
int = numbers such as 1 , 2, 3
double =?? does a double mean decimal numbers?
float = ?? does this mean larger decimal numbers?

srry am very new to this myself

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.