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
Programming CRe-type the code and fix any errors. The code should convert non-positive numbers to 1.
LUCKY_DIMON [66]

Answer:

Given

The above lines of code

Required

Rearrange.

The code is re-arrange d as follows;.

#include<iostream>

int main()

{

int userNum;

scanf("%d", &userNum);

if (userNum > 0)

{

printf("Positive.\n");

}

else

{

printf("Non-positive, converting to 1.\n");

userNum = 1;

printf("Final: %d\n", userNum);

}

return 0;

}

When rearranging lines of codes. one has to be mindful of the programming language, the syntax of the language and control structures in the code;

One should take note of the variable declarations and usage

See attachment for .cpp file

Download cpp
5 0
4 years ago
freeeeeeeeeeeeeeeeee poiiiiiiiiiiiiiiiiiiiiiiiiiinnnnnnnnnnnnnnnnnnnnnnttttttttttttttttttttttttsssssssssssssssssss
Jlenok [28]

Answer:

i want some

Explanation:

EEEEEEEEEEE

7 0
3 years ago
Read 2 more answers
Q: The first step to format your spreadsheet data is to _____
Semmy [17]
Add your headings in the row of cells at the top of the sheet
6 0
2 years ago
which of the following jobs typically requires an associate's degree? fashion merchandising retail clerk telemarketer purchasing
natulia [17]

Answer is: Purchasing manager

Explanation:


<u>What is an Associate's Degree? </u>

Associate degrees are simply two-year degrees. Although they can take longer or shorter to complete, depending on the pace of study, they are generally half the workload of a four-year bachelor’s degree. They are, therefore, about half the price of a bachelor’s degree, and sometime significantly cheaper than that because associate’s degrees are often provided by more affordable community colleges.

<u>Purchasing Manager Role:</u>

A Purchasing Manager is an employee within a company, business or other organization who is responsible at some level for buying or approving the acquisition of goods and services needed by the company. ... seeking reliable vendors or suppliers to provide quality goods at reasonable prices. negotiating prices and contracts.

Most employers prefer to hire purchasing managers with a four-year college degree. A business degree, especially with a focus in purchasing or supply management, is particularly useful. Another good combination is an undergraduate degree in a technical field and a master's degree in business administration.

8 0
3 years ago
Read 2 more answers
What property of semi-metals is useful in the computer industry?
artcher [175]
The answer is (a. Semi-conducting)
In the computer industry, semi-metals with a semiconducting property are useful in making of semiconductors. These metals have high resistance but lower than compare to insulators. This conductor could be crystalline or amorphous solids.
4 0
3 years ago
Other questions:
  • What inventor patented the first America movie projector
    13·2 answers
  • All the answers I've got is 0, which seems strange but I'm sure I'm following this algorithm correctly.
    15·1 answer
  • Software companies will often release a(n) ___ version to a limited audience that will test it on their systems. Programmers can
    11·1 answer
  • A logistics company's vulnerability scan identifies the following vulnerabilities on Internet-facing devices in
    8·1 answer
  • Name of the electrical tool and their classification
    10·1 answer
  • What is the purpose of a poster frame?
    5·2 answers
  • Ben is writing a paper for his college history class, and he wants to include some information he found on a Web site. What are
    5·1 answer
  • You are hired by a game design company and one of their most popular games is The Journey. The game has a ton of quests, and for
    12·2 answers
  • ASAP PLEASE the online research you did to describe how Senet is related to the culture and historical period when it was create
    9·1 answer
  • 2. Why do you think the order of operations still applies in Java? Give an example to show what could happen if you didn't use o
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!