answersLogoWhite

0


Best Answer

The arrow is used when a pointer variable is used to get at a member of a structure, and the dot operator is used when dealing with the real structure.

ptr->fld == (*ptr).fld
str.fld == (&str)->fld

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is difference between the arrow and the dot operator in c structures?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is the HTML code to display an arrow icon?

There is no specific HTML code for displaying an arrow icon. However, you can use CSS or a library like Font Awesome to achieve this. For example, with Font Awesome, you can add the following HTML code: to display a right arrow icon.


What is the Difference between physical DFD and logical DFD?

For a physical Data Flow Diagram you explore into the logical DFD. for example, if you have a data flow arrow declared as "customer information" now the physical DFD would include in that data flow arrow "customer information = customer_name + customer_address". something along these lines Physical DFD shows how various functions are performed and who does them but Logical DFD strips away all physical constraints but does not restrict physical happenings from taking place.


What are arrow loops?

an arrow loop is a slit or hole used to shoot arrows through.


What is the difference between CSS box shadow and CSS filter drop-shadow?

A CSS box shadow effect is applied to the outer layer of an element while the filter drop-shadow, an experimental property, follows the rendered shape of any element including pseudo elements, such as a tootip with an arrow. A filter drop-shadow also takes into account the transparent aspects of a .png image.


The dimmer switch in a lighting circuit controls the brightness of one or more lamps by varying the resistance in the circuit what schematic symbol could be used to represent this device?

Use the standard resistor symbol and then place an arrow across the resistor. The bottom of the arrow midpoint of the resistor and just below, the tip of the arrow (draw with an arrow head) just above the resistor. This represents the wiper of the variable resistor.

Related questions

What are the differences between structures and arrays?

Arrays are collections of repeated data items. Structures are complex data items made up of other data items, including, potentially, other structures and arrays. You can, of course, also have arrays of structures. Array items can be accessed by using its subscript whereas structure items can be accessed using its dot or "arrow" operator in C, C++, C#, Java, and JavaScript.


When to use the dot operator and when to use the arrow operator in c plus plus?

You use the dot operator when the left side is the name of the object or a reference to an object, and you use the arrow operator when the left side is a pointer to an object. Example: struct foobar x, *p= &x; x.field = p->field; (&x)->field = (*p).field;


What is the difference between pressing the Delete key or the left arrow key in the middle of a line of text?

Delete key deletes any amount of text. The left arrow key only moves the I beam


What is the difference between an arrow and a dart?

An arrow is part of a weapon system that is designed to be deadly. A dart as a weapon, although it can be deadly, is designed only to wound. Darts were and are most often used in games of skill.


What is the moral of the story of the body in library?

Always check your spelling! There is a major difference between "Shoot me an Aero!" and," Shoot mean arrow"


What is an difference between a ray and line in math?

a line has a dot on each end and a ray only has one dot and an arrow, it keeps on going.


What is the difference between a compound bow and a recurved bow?

Compounds have cams at the end of the bow which make it easier to pull back and pushes the arrow farther.


How do you switch between elements on Spyro a new beginning ps2?

You can change between elements using the arrow buttons. Fire: Up arrow button Electricity: Right arrow button Ice: Down arrow button Earth: Left arrow button


What is the difference between a line and a ray How do you show a ray in writing?

A line extends infinitely in both directions, a ray in only one. A ray can be shown by drawing a small arrow above the name of the ray, with the arrow pointing in the direction of the ray.


What is the difference between normal ray and the normal?

i think that normal is a line segment and normal ray is a line with an arrow head like vector to point in a certain direction....


What structures break in reactants?

These structures are bonds. 100% positive.


What is the difference between an archery and a vein?

Archery is a sport involving shooting an arrow with a bow. A vein is a blood vessel responsible for returning deoxygenated blood from the body back to the heart.