Is there any way to know the system date automatically using a c program ?
If yes please guide me through some codes !!

There functions in <time.h> such as time, localtime, and strftime.

#include <stdio.h>
#include <time.h>

int main(void)
{
   time_t now;
   if ( time(&now) != (time_t)(-1) )
   {
      struct tm *mytime = localtime(&now);
      if ( mytime )
      {
         char buffer [ 32 ];
         if ( strftime(buffer, sizeof buffer, "%x", mytime) )
         {
            printf("buffer = \"%s\"\n", buffer);
         }
      }
   }
   return 0;
}

/* my output
buffer = "06/08/05"
*/