Program to print current date and time in C++ #programming

preview_player
Показать описание
In this video we will discuss about a minor C++ project in which we display current date and time on our screen.
The above code is also valid in C by using printf() function instead of cout object because cout is not supported by C programming.

Link to watch difference between machine learning, artifical intelligence and deep learning-

Link to watch C++ tutorial for begineers in Hindi-

#programming #c #coding #c++ #cproject
#c #all #code #program #cpp
Рекомендации по теме
Комментарии
Автор

The code used is -

// To print date and time on screen.
#include<iostream>
using namespace std;
int main()
{
cout<<"current date is"<<__DATE__;
cout<<endl;
cout<<"current time is"<<__TIME__;
return 0;
}

tfuncoding
Автор

mam how can we write day of that particular date ? like you make it very easy for finding date and time is it possible to fin day with same method ??

iam_sami
Автор

MAAM, TIME IS NOT GETTING CORRECT BUT DATE IS CORRECT FOR ME

HarshitSingh-ttcv
Автор

What is the meaning of // in ist line?

luvwithphysics
Автор

Mam can you explain
__DATE__
__TIME__

roshankumarsingh