Chapter - 11: Structures

With reference to the below declaration which of the following refers to seconds correctly.


C
Sections
4
Exercises

A

B

C

D

1

2

3

4

5

struct time
{
	int hours;
	int minutes;
	int seconds;
} t;
struct time *pt;
pt = &t;

1. pt.seconds
2. (*pt).seconds
3. time.seconds
4. pt->seconds


Ans:
2. (*pt).seconds
4. pt->seconds


© 2020 Garbage Valuegarbage value logo