python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
Why does data packing 4 integers into a 32 bit integer have different results in Nextion and Teensy(Arduino compatible)
I'm controlling a Teensy 3.5 with a Nextion touchscreen. On the Nextion the following code packs 4 8 bit integers into a 32 bit integer:
sys0=vaShift_24.val<<8|vaShift_16.val<<8|vaShift_8....
elf
Votes: 0
Answers: 1
Packing rectangles inside a rectangle
I was trying to find some algorithm that would pack a bunch of different rectangles inside a rectangle with fixed width and unlimited length. Unfortunately, I couldn't find anything relevant.
I though...

brkicpetar
Votes: 0
Answers: 0
Is it possible to pack a struct in C to size defined by bits
I have the following struct
struct header {
unsigned int op:16;
unsigned int A:1;
unsigned int B:1;
unsigned int C:1;
unsigned int pad:1;
}
int main() {
struct header a;
...
CforLinux
Votes: 0
Answers: 2
What is happening struct padding or packing in 64 bit computer
Code 1
#include <stdio.h>
//structure var
struct var{
char a;
};
int main()
{
struct var r;
printf("%ld\n", sizeof(r));
return 0;
}
Output: 1
I know the concept of padding and p...
F.C. Akhi
Votes: 0
Answers: 0