lhahn
lhahn

Reputation: 1241

Difference between hexadecimal values and normal types

I am doing an assignment in c:

Basically I have a struct where it has char and int types. The assignment says that I have to fill the struct fields with some predefined values.

The thing is that those values are represented as hexadecimal values. Since I am a bit confused with hexadecimal, I would like to fill the fields with normal values.

For example an int filed, I would like to assign 20151 instead of 0x4EB7.

I know it works but still I am a bit worried, is there any difference between these representations?

Upvotes: 0

Views: 168

Answers (1)

Scott Hunter
Scott Hunter

Reputation: 49893

They are 2 ways of expressing the same thing; you can use whichever makes the most sense.

Upvotes: 3

Related Questions