Questions tagged [bytes]
The bytes tag has no usage guidance.
6 questions
0
votes
1
answer
578
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
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 = ...
0
votes
1
answer
87
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
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?
0
votes
1
answer
26
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
2
answers
80
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)