1 Answer - Sort by: Date | Rating
The .dot operator in structure is used to access the data members of a structure for reading/writing purposes. By using .dot operator the programmer is calling the data member of a structure. Since structure is a collection/container of variables not just a simple variable therefore the data member that the programmer wants to access is specified after the .dot operator. The structure may contain character, integer, strings, and pointers in short every type of variable that is supported in a programming language.
If the .dot operator is not used the compiler will not know about the variable programmer wants to access.
In order to understand the concept of .dot operator let's have a short example;
Struct personal
{
int age;
char[20] name;
int tel_no;
char[100] postal address
};
It's a structure that has got four member variables, i.e age, name, tel_no and postal address. If the programmer wants to access the age variable of a structure personal s/he will use the following statement'
Personal.Age
Similarly if the programmer is referring to the tel_no of a person the following statement will access the structure personal data member tel_no
Personal.tel_no
If the .dot operator is not used the compiler will not know about the variable programmer wants to access.
In order to understand the concept of .dot operator let's have a short example;
Struct personal
{
int age;
char[20] name;
int tel_no;
char[100] postal address
};
It's a structure that has got four member variables, i.e age, name, tel_no and postal address. If the programmer wants to access the age variable of a structure personal s/he will use the following statement'
Personal.Age
Similarly if the programmer is referring to the tel_no of a person the following statement will access the structure personal data member tel_no
Personal.tel_no
0
0
- How To Use My Programming Skill In Banking?
- How Do I Manually Program My Audiovox 8910?
- What Are The Syntax Of JAVA Programming Language?
- What Is Structure In C Language?
- What Is For Loop?
- What Is A Loop Arch And Whorl?
- Define The Difference Between Logical And Physical Data Views?
- What Types Of Programming Language Statements Are Likely To Be Translated Into Machine Instructions By A Compiler?
- How Middleware Works Between Client And Server?
- Can You Give Me An Sample Program Of A Magic Square?
- Obtain An Inherit Ant Hierarchy For The Following In The Kitchen Super Class, Class Object For The Following: Book,viral Infection,rodents?
- What Is Table,cell,row And Columns In MS Word?
- Example Program To Fill Elements Into A List. Also, Copy Them In Reverse Order Into Another List?
- How To Create A Java Program That Accepts A Number And Examines If It Is Odd Or Even And Positive Or Negative?
- How To Create A Java Program That Accepts 3 Numbers?
- How Does An Assembler Works In Assembly Language?
- Can You Create A Java Program That Accepts 3 Numbers (num1, Num2, Num3) And Sort Them In Ascending And Descending Order?
- What Are Some Errors In Using Database?
- What Is A Ground Loop?
- An Sql Server Is Not An Operating System... why Are People Always Asking Exam Questions On This Site?
- Select A Third-party Control Available For Visual Basic.NET. Discuss How This Control Is Used In An Application. What Are The Advantages And Disadvantages Of Using Third-party Controls In Your Applications?
- When Will The Program End?
- Which Language Is Best Between Java And .net?
- What Is 4nf?
- What Is The Un Theme Of The Year 2009?
- Where Can You Use The Cast Operator In C++?
- What Is The Definition Of An Operator?
- What Is Meant By The C++ '!=" Operator?
- What Does It Mean To Be A Smooth Operator?
- Soon To Be Owner-operator, Can You Help?
- What Is A Foley Operator?
- How To Be An Owner/operator?
- I Need To Get Extension But Can't Get To An Operator What Can I Do?

New Comment - Comments are editable for 5 min.