0

If i want to stars with -1 what should i do??

in c++,c which data type should I use for -1

28th Feb 2018, 4:49 AM
prajakta ingavale
3 Respostas
+ 5
use int,i t doesn't matter whether it's positive or negative if it's whole... int a=-1;
28th Feb 2018, 4:53 AM
᠌᠌Code X
᠌᠌Code X - avatar
+ 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).
28th Feb 2018, 6:19 AM
Timon Paßlick
+ 2
Start what, exactly? For storing negative integers, use int.
28th Feb 2018, 4:52 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar