3

You're initializing the string color with a string literal. This is stored in a read-only memory — you can't modify its contents. To be able to modify the contents of a string, here are 2 approaches Approach #1: to declare an array of chars that's big enough to hold the characters of the string + the null character char color[7]; Approach #2: to ...


2

There might be sufficient information at: http://en.wikipedia.org/wiki/Hexadecimal


2

fputc(0x00, output); really puts a single char. 0x00 in hexadecimal is exactly one byte. the 0x is not part of the number, it just indicate that the number is in fact hexadecimal. Would be good clarify that, the padding in the example image is really == 1 (1 byte), at the end of each scanline. Since there are 3 vertical lines so there are a total of 3 ...


2

What it does, Kareem, is it puts one byte with every iteration of the loop. padding is equal to 3 (i.e., 3 bytes) in this case! :)


1

Right... starting from the link to Microsoft's MSDN which you can find inside pset4/bmp/bmp.h: https://msdn.microsoft.com/en-us/library/dd183376(VS.85).aspx Click the link and you'll see they telling you that biHeight can be either positive or negative, meaning this: biHeight The height of the bitmap, in pixels. If biHeight is positive, the bitmap ...


1

fffffff4 in hexadecimal equals.......4294967284 in decimal


1

binary, octal, decimal, hexadecimal, etc are referred to as positional numeral systems. they are different ways of representing numeric values. they use something called a radix or a base. see https://www.youtube.com/watch?v=nrFHGtGdOzA for more information about hexadecimal!


1

Don't confuse hexadecimal with a type of number. It is simply a way to write the binary values in a different way. Each byte in the JPG is 8 bits long. Those 8 bits can be represented in binary, in hexadecimal, in decimal, etc, although those will all essentially mean the same thing. So the first byte of a JPG is the value 0xff (in hex), or 255 (in ...


1

In C and C++, the direct conversion goes as follows int i = 0xFF2; float f = 0xFF2.25p10; cout<<"i = "<<i<<endl<<"f = "<<f; Gives output as i = 4082 f = 4.18012e+06 However, this does not highlight the logic behind the conversion, the same can be carried out on pen and paper as follows: Write the whole hexadecimal string ...


Only top voted, non community-wiki answers of a minimum length are eligible