Last active
July 23, 2023 21:42
-
-
Save sixtusagbo/a85b130f2c20be13f206d13315ea0d9d to your computer and use it in GitHub Desktop.
signed vs unsigned in C
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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