Unexpected output from Bubblesort program with MSVC vs TCC
- by Sujith S Pillai
One of my friends sent this code to me, saying it doesn't work as expected:
#include<stdio.h>
void main()
{
int a [10] ={23, 100, 20, 30, 25, 45, 40, 55, 43, 42};
int sizeOfInput = sizeof(a)/sizeof(int);
int b, outer, inner, c;
printf("Size is : %d \n", sizeOfInput);
printf("Values before bubble sort are : \n");
…