#include <stdio.h>
#include <time.h>
int main ()
{
time_t time1,time2;
char get_input [256];
double dif_sec;
time (&time1);
printf ("Please enter the name of your pet: ");
gets (get_input);
time (&time2);
dif_sec = difftime (time2,time1);
printf ("%.2f\n", dif_sec );
return 0;
}
a) Error
b) 2
c) 2.0
d) 2.00
What will be the output of the following C code if the name entered is “TOM” and time taken to enter this name is 2 seco
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
What will be the output of the following C code if the name entered is “TOM” and time taken to enter this name is 2 seco
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!