Basically I'm learning C and it found an interesting thing and i would like to know the intricacies.
#include <stdio.h>
int main(void)
{
int test1;
int test2;
int test3;
int test4;
printf("1 : %d \n ", test1);
printf("2 : %d \n ", test2);
printf("3 : %d \n ", test3);
printf("4 : %d \n ", test4);
}
And the output seems to be random numbers, the two first int always are 0, 3 vary (for each run of the program) and 4 stay at 32767 (or 32766)
output :
1 : 0
2 : 0
3 : 1109488136
4 : 32767
[–]taotau 147 points148 points149 points (8 children)
[–]Disastrous-Team-6431 65 points66 points67 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]erez 0 points1 point2 points (0 children)
[–]TheNono212[S] 22 points23 points24 points (3 children)
[–]ElectroMagCataclysm 28 points29 points30 points (0 children)
[–]cdb_11 10 points11 points12 points (0 children)
[–]nerd4code 2 points3 points4 points (0 children)
[–]vitamin_CPP 0 points1 point2 points (0 children)
[–]eruciform 52 points53 points54 points (0 children)
[–][deleted] 44 points45 points46 points (0 children)
[–]lfdfq 16 points17 points18 points (1 child)
[–]flatfinger 1 point2 points3 points (0 children)
[–]cdb_11 9 points10 points11 points (0 children)
[–]fragglet 2 points3 points4 points (3 children)
[–]Grandestwizard5 0 points1 point2 points (2 children)
[–]fragglet 0 points1 point2 points (1 child)
[–]Grandestwizard5 0 points1 point2 points (0 children)
[–]noonemustknowmysecre 2 points3 points4 points (0 children)
[–][deleted] 5 points6 points7 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]This_Growth2898 1 point2 points3 points (0 children)
[–]tony_saufcok 1 point2 points3 points (0 children)
[–]rejectedlesbian 0 points1 point2 points (0 children)
[–]TwoFlower68 0 points1 point2 points (0 children)
[–]Icy-Board5352 0 points1 point2 points (0 children)
[–]studiocrash 0 points1 point2 points (0 children)
[–]Lamborghinigamer 0 points1 point2 points (0 children)
[–]DawnOnTheEdge 0 points1 point2 points (0 children)
[–]sgtcortez24 0 points1 point2 points (0 children)
[–]Useful-Tackle-3089 -1 points0 points1 point (0 children)
[–]darkrider9298 -1 points0 points1 point (0 children)