Questions tagged [bytes]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
311 views

Finance PROBLEM with lookup: TypeError: quote_from_bytes() expected bytes

I have Finance barely ready but like most codes, it has a buggy near the finish line. I have a problem with lookup. Always return None. I check it. and Terminal shows this error: TypeError: ...
0
votes
0answers
107 views

PSET3 Resize -resizes correctly Byte… doesn't match

I don't understand what I did wrong... Here's my code : // Copies a BMP file #include <stdio.h> #include <stdlib.h> #include "bmp.h" int main(int argc, char *argv[]) { int n = ...
0
votes
1answer
86 views

pset3 resize(less) working correctly, but check50 show a bunch of "image has more bytes than expected

I'm not sure where I went wrong that is causing it to add too many bytes. When I test the program, it seems to resize everything correctly. Code: #include <stdio.h> #include <stdlib.h> ...
1
vote
1answer
80 views

Why is int is of 4 bytes in CS 50?

While I was being taught C, it was said that the size of int datatype is 2 bytes. But in CS 50, I am being taught that it is of 4 bytes. Why is that so?
0
votes
1answer
23 views

Why “the eight such byte” would be bracket four in printf(“%c”, s[4]) ? -lecture 2

In lecture 2 (49'09''), speaking about s[i] (like in printf("%c", s[i]) ), David says: "So if you want to get at the eighth such byte, which in this loop would be bracket zero, bracket one, bracket ...
0
votes
2answers
75 views

Multiple byte storage and comparison

How should I by using these bytes(spaces in between each bytes?) and What type of variable would nf need to be in this context? if(nf == 0xff 0xd8 0xff 0xe0 || nf == 0xff 0xd8 0xff 0xe1)