1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Katyanochek1 [597]
3 years ago
10

Suppose I define some structure type ( studentInfo), then I declare an instance of it and I decide to also create a pointer to t

he instance like so:
typedef struct{

int age;
char idNum[9];
}
studentInfo;

...Code continues...

struct studentInfo mainInfo, *pMain;
pMain = &mainInfo;

Which of the following options is functionally equivalent to:

a. (p*Main).age = 20;
b. *pMain.age = 20;
c. pMain.age = 20;
d. *(pMain.age) = 20;
Computers and Technology
1 answer:
Nookie1986 [14]3 years ago
8 0

Answer:

a. (p*Main).age = 20;

Explanation:

Pointers use ->

where as normal variable use . to access its members

pMain is the pointer.

*pMain is the value inside pMain.

pMain->age = 20;

This statement equals to

(*pMain).age = 20;

Answer is option a.

You might be interested in
Are you concerned that strangers may have access to the personal information you share on social media platforms? Why or why not
GuDViN [60]
It makes me a little uneasy at times, yes, but I know that they cannot find me unless I share way too much.
Hope this helps~!
~{Oh Mrs. Believer}
4 0
3 years ago
Zohan uses the following analogy to describe a concept of object-oriented programming. A button can have many uses. When it is p
Vika [28.1K]

Answer:

Polymorphism

Explanation:

You can have a basic button class that gets inherited by other classes.

class Button {

function pushButton(){}

}

class ElevatorButton extends Button{};

class BigRedButton extends Button{};

With these new classes, they inherit from the basic button class. They can decide what happens when the method pushButton() is called.

You don't need to worry about what pushButton() actually does, you can just call it if the object is of the type "Button" and you can expect it to work.

4 0
2 years ago
When water reaches the pole, most of it turns to ice. Some salt is trapped between ice crystals, but most is left behind in the
astra-53 [7]

Answer:

b should be the right answer

Explanation:

8 0
3 years ago
Read 2 more answers
Can web sites contain copyright material? <br> Yes <br> No
Maru [420]
Yes they can contain copyright
6 0
3 years ago
Read 2 more answers
Safety interlock module operates by monitoring the voltage from the
mario62 [17]
The answer to this question, is B: Ignition coil
4 0
3 years ago
Other questions:
  • For a typically large organization how many dns servers should you install
    5·1 answer
  • Select the proper ergonomic keyboarding techniques.
    9·1 answer
  • To alter just one character in a StringBuilder, you can use the ____ method, which allows you to change a character at a specifi
    5·2 answers
  • You are building a gaming computer and you want to install a dedicated graphics card that has a fast GPU and 1GB of memory onboa
    6·1 answer
  • Which of the following is the most important system if a company wants to consolidate fan data from multiple sources, i.e., exte
    11·2 answers
  • For what purpose power point is used?​
    5·2 answers
  • Examples of structures that can store homogeneous data element​
    14·1 answer
  • To embed a Flash file, you must specify a location for the embedded video clip with the ____ parameter and a size for the clip u
    8·1 answer
  • DOES ANYONE KNOW COMPUTER SCIENCE?
    8·1 answer
  • Cybersquatters:_________.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!