Skip to content

Instantly share code, notes, and snippets.

@sixtusagbo
Last active July 23, 2023 21:42
Show Gist options
  • Save sixtusagbo/a85b130f2c20be13f206d13315ea0d9d to your computer and use it in GitHub Desktop.
Save sixtusagbo/a85b130f2c20be13f206d13315ea0d9d to your computer and use it in GitHub Desktop.
signed vs unsigned in C
#include <stdio.h>
/**
* main - Entry point
*
* Return: Always (0)
*/
int main(void)
{
unsigned int num_one = 3;
signed int num_two = -40;
signed int num_three = 5;
printf("Here is an unsigned number -> %u\n", num_one);
printf("Here is a signed negative number -> %i\n", num_two);
printf("Here is a signed positive number -> %i\n", num_three);
return (0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment