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
Laura has many online accounts discuss the privacy concerns associated with individuals use of the Internet
Ronch [10]
When you have only one account that narrows down how much information you have given out the the internet world. At the same time this lines you up with specific info about where you might live.... etc... 

When you create multiple accounts you have many different, lets say "connections", to the internet world. At the same time by having multiple accounts that can jumble up the information and make it harder for people to break into your computer, find where you live, etc... 
8 0
3 years ago
PROGRAM LANGUAGE C
meriva

Answer:

I'm better at C++, but I'm pretty sure this it:

/*C - Program to compare two strings  

character by character.*/

#include<stdio.h>

int main(){

char str1[]="Hello";

char str2[]="Hello";

int len1=0, len2=0;

int i,isSame=0;

 

//calculate lengths

i=0;

while(str1[i++]!='\0') len1++;

i=0;

while(str2[i++]!='\0') len2++;  

 

if(len1!=len2){

 printf("Strings are not same, lengths are different\n");

 return -1;

}

 

isSame=1;  

for(i=0;i<len1;i++){

 if(str1[i]!=str2[i]){

  isSame=0;

  break;

 }

}

 

if(isSame)

 printf("Strings are same.\n");

else

 printf("Strings are not same.\n");

 

return 0;

}

5 0
3 years ago
Question # 2 Multiple Choice Which finger presses the H key on the keyboard? index finger on the right hand index finger on the
Lera25 [3.4K]
Index finger right hand!
Hope this helps! :)
8 0
3 years ago
When a browser is open on your computer, what browser tool is used to move the webpage to the previously viewed page on the brow
ch4aika [34]

Answer:

back arrow button

Explanation:

7 0
3 years ago
Write code to complete print_factorial()'s recursive case. sample output if user_val is 5: 5! = 5 * 4 * 3 * 2 * 1 = 120
maxonik [38]
```
#!/usr/local/bin/python3


import sys

def print_factorial( user_val ):
    if( user_val < 1 ):
        return( 1 )
    else:
        return( print_factorial( user_val - 1 ) * user_val )


if( __name__ == "__main__" ):
    if( len( sys.argv ) == 2 ):
        print( print_factorial( int ( sys.argv[ 1 ] ) ) )
    else:
        sys.stderr.write( "usage: %s <integer>\n" % sys.argv[ 0 ] )

    exit( 0 )
```

5 0
3 years ago
Other questions:
  • 1. What does a transistor do?
    6·1 answer
  • A person who enjoyed making paper airplanes as a child might very well find a satisfying career as a(n) _____ engineer.
    7·2 answers
  • A restaurant has a case type that allows customer to book the dining room for events. Customers provide basic information includ
    11·1 answer
  • Although designed to support remote dial-in access to a corporate network, what service below is commonly used with 802.1x port
    12·1 answer
  • What are the two ways to print a document?
    11·1 answer
  • How is “compromise" defined in the context of information technology and Select one answer.
    5·2 answers
  • I have at least 20-30 typing entries on my keyboarding log <br><br><br> true or false
    8·1 answer
  • In a complex formula, how does excel determine which calculation to perform first?.
    10·1 answer
  • Using AI to filter potential job applicants might be considered _____
    11·2 answers
  • us refe rence: so 1 ac 2 2. describe the applications for merged documents in terms of the following benefits 2. describe the ap
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!