Skip to content

Commit

Permalink
task: Rename variables
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriel Mocanu <[email protected]>
  • Loading branch information
gabrielmocanu committed Mar 30, 2024
1 parent 9e58b67 commit 6f4139d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions curs/chap-04-reprezentare/03-signed-unsigned/signed_unsigned.c
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#include <stdio.h>

unsigned char uc = 0xaa;
signed char sc = 0xaa;
unsigned char unsigned_char = 0xaa;
signed char signed_char = 0xaa;

short int si = -1;
unsigned int ui;
short int short_int = -1;
unsigned int unsigned_int;

int main(void)
{
printf("%hhu, %hhd\n", uc, sc);
printf("%hhu, %hhd\n", unsigned_char, signed_char);

ui = si;
printf("si (%p): 0x%08x, si: %u, si: %d\n", &si, si, si, si);
printf("ui (%p): 0x%08x, ui: %u, ui: %d\n", &ui, ui, ui, ui);
unsigned_int = short_int;
printf("short_int (%p): 0x%08x, short_int: %u, short_int: %d\n", &short_int, short_int, short_int, short_int);
printf("unsigned_int (%p): 0x%08x, unsigned_int: %u, unsigned_int: %d\n", &unsigned_int, unsigned_int, unsigned_int, unsigned_int);

return 0;
}

0 comments on commit 6f4139d

Please sign in to comment.