Display the time of the system and display the right time
of the other country
Answer / ln007
Program to read the current date and time
#include<time.h>
main()
{
struct tm *k;
unsigned long int t;
int h,m,s;
int dd,mm,yy;
t = time(0);
k = localtime(&t);
h = k->tm_hour;
m = k->tm_min;
s = k->tm_sec;
dd = k->tm_mday;
mm = k->tm_mon+1;
yy = k->tm_year+1900;
printf("Time : %d : %d : %d\n",h,m,s);
printf("Date : %d : %d : %d\n",dd,mm,yy);
}
| Is This Answer Correct ? | 0 Yes | 1 No |
void main() { int i=i++,j=j++,k=k++; printf(“%d%d%d”,i,j,k); }
why java is platform independent?
main() { char *p = "hello world"; p[0] = 'H'; printf("%s", p); } a. Runtime error. b. “Hello world” c. Compile error d. “hello world”
What is the hidden bug with the following statement? assert(val++ != 0);
plz send me all data structure related programs
main() { int i; float *pf; pf = (float *)&i; *pf = 100.00; printf("\n %d", i); } a. Runtime error. b. 100 c. Some Integer not 100 d. None of the above
How will u find whether a linked list has a loop or not?
What is the difference between proc means and proc tabulate ? explain with a simple example when you have to use means or tabulate?
main() { float me = 1.1; double you = 1.1; if(me==you) printf("I love U"); else printf("I hate U"); }
How do you write a program which produces its own source code as its output?
main() { int i=400,j=300; printf("%d..%d"); }
how to delete an element in an array