output of this simple c program and why?

#include <stdio.h>

   main()

   {

       if (sizeof(int) > -1)

           printf("True");

       else

           printf("False");

   }

sizeof cpp

Both versions return a constant of type std::size_t.

from where you can read

std::size_t is the unsigned integer type

Hopefully it’s clear now.

Of course you could try without asking - http://ideone.com/ktV0qH

1 Like

thanx its now clear