Please fill in the blanks for C /* This function works with pointers and structures. All codes will be in main().   Define a struct time with 3 fields: hours, minutes, and seconds (all ints) in that order. */ /* Pointers and Structures*/   #include   //Define a structure of type struct time struct time {             __1__ hours;             __2__ minutes;             __3__ seconds; };   int main() {             //Declare 2 struct of type struct time called t1 and t2             __4__ __5__ t1, t2;               //Declare a pointer-to-struct called pt of the same type             __6__ __7__ __8__;               //Initialize the pointer point to t1             __9__ = __10__;                 //Assign values to each member. No space!!               //1. using t1 variable             __11__ = 3;  //hours             __12__ = 15; //minutes             __13__  = 59; //seconds               //2. Using de-referecing pointer pt and period. Remember the ()             __14__ = 3; //hours             __15__  = 15; //minutes             __16__  = 59; //seconds                 //Printing format: hours:minutes:seconds             printf("Printing t1 using t1 variable: __17__:__18__:__19__\n",  __20__, __21__, __22__);              printf("Printing t1 using pt pointer: __23__:__24__:__25__\n", __26__, __27__, __28__);                //Point pointer-to-struct to t2             __29__ = __30__;               //Assign values to each member             //using t2 variable             __31__ = 11;  //hours             __32__ = 43; //minutes             __33__ = 23; //seconds                 //Using arrow operator             __34__ = 11; //hours             __35__ = 43; //minutes             __36__ = 23; //seconds               //Printing format: hours:minutes:seconds             printf("\nPrinting t2 using t2 variable: __137__:__38__:__39__\n",  __40__, __41__, __42__);              printf("Printing t2 using pt pointer: __43__:__44__:__45__\n", __46__, __47__, __48__);              return 0; }

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

Please fill in the blanks for C

/* This function works with pointers and structures. All codes will be in main().
  Define a struct time with 3 fields: hours, minutes, and seconds (all ints) in that order. */

/* Pointers and Structures*/

 

#include<stdio.h>

 

//Define a structure of type struct time

struct time

{

            __1__ hours;

            __2__ minutes;

            __3__ seconds;

};

 

int main()

{

            //Declare 2 struct of type struct time called t1 and t2

            __4__ __5__ t1, t2;

 

            //Declare a pointer-to-struct called pt of the same type

            __6__ __7__ __8__;

 

            //Initialize the pointer point to t1

            __9__ = __10__;

 

 

            //Assign values to each member. No space!!

 

            //1. using t1 variable

            __11__ = 3;  //hours

            __12__ = 15; //minutes

            __13__  = 59; //seconds

 

            //2. Using de-referecing pointer pt and period. Remember the ()

            __14__ = 3; //hours

            __15__  = 15; //minutes

            __16__  = 59; //seconds

 

 

            //Printing format: hours:minutes:seconds

            printf("Printing t1 using t1 variable: __17__:__18__:__19__\n",  __20__, __21__, __22__); 

            printf("Printing t1 using pt pointer: __23__:__24__:__25__\n", __26__, __27__, __28__); 

 

            //Point pointer-to-struct to t2

            __29__ = __30__;

 

            //Assign values to each member

            //using t2 variable

            __31__ = 11;  //hours

            __32__ = 43; //minutes

            __33__ = 23; //seconds

 

 

            //Using arrow operator

            __34__ = 11; //hours

            __35__ = 43; //minutes

            __36__ = 23; //seconds

 

            //Printing format: hours:minutes:seconds

            printf("\nPrinting t2 using t2 variable: __137__:__38__:__39__\n",  __40__, __41__, __42__); 

            printf("Printing t2 using pt pointer: __43__:__44__:__45__\n", __46__, __47__, __48__); 

            return 0;

}

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-engineering and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY