You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
444 B
C

#include <stdio.h>
int main()
{
u_int8_t my_ubit = 255;
int8_t MY_BIT = 0x03;
char name[10] = "Laura";
printf("Hello %s!\n", name);
printf("The value of my_ubit: %d\n", my_ubit);
printf("The value of MY_BIT: %d\n", MY_BIT);
printf("This occuppies: %d bytes\n", (int)(sizeof(my_ubit)));
printf("The value of my_ubit: %d\n", my_ubit << 1);
my_ubit = my_ubit >> 1;
printf("The value of shifted my_ubit: %d\n", my_ubit);
return 0;
}