C Programming - Structures, Unions, Enums - Discussion

Discussion Forum : Structures, Unions, Enums - True / False Questions (Q.No. 7)
7.
The '.' operator can be used access structure elements using a structure variable.
True
False
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
8 comments Page 1 of 1.

Subha said:   1 decade ago
Please explain with example?

Bhargavi said:   1 decade ago
Why I know that structure variables are not accessed using?

Soureek said:   1 decade ago
#include<stdio.h>
int main()
{
struct emp
{
char name[25];
int age;
}
struct emp e
e.name="Soureek";
e.age=22;
printf("%s %d\n",e.name,e.age);
return 0;
}

Rahul said:   10 years ago
Please tell me more about it.

Naveenprasath said:   9 years ago
Give me the explanation.

Mahes said:   9 years ago
Please give simple way of explanation.

Muhammed_Elsheikh said:   8 years ago
@Mahes @Naveenprasth @Rahul @Subha.

e.name.
e ------> structure element.
name-> structure variable.
. (dot) -------> operator.
variable (name) of the element (e) is accessed by operator ( . ).
(1)

Kalyan babu said:   7 years ago
@Muhammed_Elsheikh.

Thanks for clear explaination.

Post your comments here:

Your comments will be displayed after verification.