Skip to main content

Questions tagged [bytes]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
573 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: ...
santiago correa's user avatar
0 votes
0 answers
109 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 = ...
n1coii's user avatar
  • 1
0 votes
1 answer
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> ...
Jgoren's user avatar
  • 17
1 vote
1 answer
121 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?
Nitish Panda's user avatar
0 votes
1 answer
25 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 ...
Martin's user avatar
  • 201
0 votes
2 answers
79 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)
user1475's user avatar