valid data type

i started learning c++ and i have to solve a few questions for my class but i'm kinda confused.

i have to specify if the next ones are valid c++ data and if are real numbers or integer.

a) 237,822
b) 12345678L
c) 0x87
d) 0515
e) 0.5
f) 018CDF

as far as i understand this would be the answers

a)integer so it's valid ( i'm doubting 'cause of the coma)
b)Integer long Numeral so it's valid
c)integer hexadecimal so it's valid
d)integer octal so it's valid
e)real number so it's valid
f) is not valid because of the letters.

please let me know if i made any mistakes and the reason why it's wrong.
thanks in advance
I think that you are right. At least you can check youself with some C++ compiler.
i just started learning and the teacher gave us some material to read which is not very detailed and i don't know yet how to use a compiler. :(
Here

a) 237,822

if consider this as a number there is an error because comma is not used in representation of numbers. But it also can be considered as the operator comma. In this case there are two integer numbers and the result of the expression is the value of the second number.
thanks for the answers.
Last edited on
Topic archived. No new replies allowed.