0
If i want to stars with -1 what should i do??
in c++,c which data type should I use for -1
3 odpowiedzi
+ 5
use int,i t doesn't matter whether it's positive or negative if it's whole...
int a=-1;
+ 3
All the integral types which can store -1 ordered by their typical size in bytes:
1 - signed char
2 - short
4 - int
8 - long
16 - long long
These standards aren't for guarantee, so you can check the size by doing sizeof(your_type).
+ 2
Start what, exactly?
For storing negative integers, use int.