How do you decide which integer type to use?



How do you decide which integer type to use?..

Answer / Anjali

When deciding which integer type to use, consider the range of values needed to be stored, the precision required, and the target hardware architecture. If the values are within a certain range (usually -32768 to 32767), an `int` is often a good choice. For smaller or larger ranges, consider using `char`, `short`, `long` or other types.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What is the advantage of c++ over c?

1 Answers  


Does c++ have finally?

1 Answers  


What is "strstream" ?

1 Answers   Huawei,


check whether a no is prime or not.

3 Answers   TCS,


What do manipulators do?

1 Answers  


Explain what happens when a pointer is deleted twice?

1 Answers  


What is #include iostream?

1 Answers  


What is the difference between a reference and a pointer?

1 Answers  


without if else statement can be written ah

0 Answers  


What are static member functions?

1 Answers  


What is the correct syntax for inheritance a) class aclass : public superclass b) class aclass inherit superclass c) class aclass <-superclass

1 Answers  


How many static variables are created if you put one static member into a template class definition?

1 Answers  


Categories