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
Can rank u r guys in rocket leagye
Cerrena [4.2K]
Ha ha ha ha ha ha ha ha
4 0
3 years ago
Which of the following names in a program is equivalent to the name int?
kirill115 [55]
Im guessing js, python etc.

3 0
3 years ago
Read 2 more answers
1) Input - to be done in main() Prompt the user for and input the number of units. Prompt the user for and input the amount for
denis-greek [22]

Answer:

#include <iostream>

using namespace <std>;

double calcTuition(double units, double studentFees);

void output(double total);

int main{

   double unitCost, schoolFees, total;

   cin >>"Enter unit cost: " >> unitCost;

   cin >>"Enter school fees: " >> schoolFees;

   total = calcTuition( unitCost, schoolFees );

   output( total );

}

double calcTuition(double units, double studentFees){

   return unit * studentFees;

}

void output(double total){

   cout << " Total: " << total;

}

Explanation:

The C++ console source code prints out the total cost of a student's tuition. The student is prompted to input the units and the school fees and the total is displayed excluding parking fees.

8 0
3 years ago
Whats the highest rank in brainly
vampirchik [111]

1. Beginner

2. Apprentice

3. Rising star

4. Helping Hand

5. Ambitious

6. Virtuoso

7. Expert

8. Ace

9. Genius

8 0
3 years ago
Read 2 more answers
Case Project 9-4: Troubleshoot an IP configurationYou work at a help desk and have just received a call from an employee who say
Svetllana [295]

Answer:

To get the IP address and other information on the workstation, type 'ipconfig' for windows or 'ifconfig' or Linux and press the return key.

The subnet mask is a class B type and 169.254.14.11 IP address shows that the workstation cannot access the DHCP server, so the IP address is not properly configured for network connection.

Explanation:

A computer network is an interconnection and intercommunication of two or more computer devices. All devices in a network must have an IP address, which can be static or dynamic from a DHCP server.

When a computer is configured to receive IP address from a DHCP server, but cannot reach the server, the IP address from the range of 169 is automatically assigned to it but still would not be able to communicate with other devices in the network.

4 0
3 years ago
Other questions:
  • Tanya is entering the amount of money she has earned from babysitting onto an Excel spreadsheet, but the AutoComplete feature is
    9·2 answers
  • Type the correct answer in the box. Spell the word correctly. Which framework can be used to develop cross-platform applications
    15·2 answers
  • What are some pros for having your phone during school hours?
    10·2 answers
  • ___ consists of a central conductor surrounded by a shield (usually a wire braid).
    9·1 answer
  • A ____ is an electronic device, operating under the control of instructions stored in its own memory, that can accept data, proc
    11·1 answer
  • Information has just been sent from a Web form on a client's system to a Web server. Which of the following is required to proce
    14·1 answer
  • 10<br> Which of the following is not one of the most popular Spreadsheet software applications?
    6·1 answer
  • You want to purchase a computer, and the salesperson refers to separate pricing for a system unit and for the software applicati
    9·1 answer
  • Diferencias entre ciencia y tecnologia
    5·1 answer
  • A(n) ________ address is the address that external entities use when communicating with your network.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!