11 Oct 2019

  • October 11, 2019
  • Amitraj

Program of System Date and Time:-









#include <stdio.h>

#include <time.h>

int main()
{
   time_t t;
   time(&t);
      printf("System date and time is: %s",ctime(&t));
   getch();
   return 0;
}

output:-

System date and time is: Fri Oct 11 15:40:16 2019

Related Posts:

  • Program to print Heart pattern Program to print Heart pattern- Have you tried generating different patterns in C or C++ ? I know its easy but I am sharing what I tried. Here is simple Heart pattern. And will look something like this : //Program t… Read More
  • Graphic program to design a moving car Graphic program to design a moving car:-                             #include<stdio.h> #include<conio.h> #include<graphics.h… Read More
  • Print text within double quotes (” “) Print text within double quotes (” “). This may seem easy but beginners may get puzzled while printing text within double quotes. // CPP program to print double quotes #include<iostream> int main() { std::cout <&… Read More
  • Happy Birthday sound in C Happy Birthday sound in C:- #include<dos.h> #include<stdio.h> int main(void) { float g3=195,a3=220,c4=263,b3=247,d4=293,g4=393,e4=330,f4=351; sound(g3); delay(100); nosound(); sound(g3); delay(500); nosoun… Read More
  • C++ program to find area using constants and defines  C++ program to find area using constants and defines #include<iostream> using namespace std; #define length 13 #define width 20        const int len = 13;     &… Read More

Translate

Popular Posts