Urgent Question about data types

Hi guys, I'm new to the forum and I have the 2 following questions regarding data types.

I'm torn between choosing A and B for #1, and torn between choose A or D for #2.

Thank you for your help in advance!!!




1. The data type of the literal 252767 is:
A. implementation dependent
B. long
C. int
D. not defined in pre-ANSIC
E. None of the above



2. The data types of:
a) unsuffixed floating literals and
b) unsuffixed integer literals, are:

A. implementation dependent in both cases.
B. determined by the value of the literals in both cases.
C. a) double
b) determined by the number of digits
D. a) double
b) determined by the value and base of the literal
E. none of the above
#1 - C for 32-bit and higher platform

#2 - D
#1 what if int is 16 bit on the platform? wouldn't that require the data type to be long and make A correct?
@AmyWalker

#1 what if int is 16 bit on the platform? wouldn't that require the data type to be long and make A correct?


Yes, you are right. It depends on what is the acceptable range of int. So in general case the answer A is more correct.
Topic archived. No new replies allowed.