Signed unsigned data types

what happens when any variable is initialized using signed and unsigned data type?

@tusharbhardwaj127
int a; now a can store negative and positive values as well.
unsigned int a; a cannot store negative values.
but the range of positive values in unsigned would be twice as that of int.

what in case of signed = “value” ? if data type not provided then it will be an error?

can you please share me any link through which i can read about this signed and unsigned data types?

No, it wont show error, but it will not give correct result.
http://www.cplusplus.com/doc/tutorial/variables/

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.