Alex Rivera | Logout

How to cast or convert an unsigned int to int in C?

Asked 2011-02-26T20:19:04.487
31

My apologies if the question seems weird. I'm debugging my code and this seems to be the problem, but I'm not sure.

Thanks!

Edit
Report

1 Answer

3

If you have a variable unsigned int x;, you can convert it to an int using (int)x.

answered 2011-02-26T20:23:16.647

Your Answer