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
astra-53 [7]
3 years ago
14

Given the declaration: char a[] = "Hello"; char *p = a, *q; what operations are valid syntactically? Select all that apply. Grou

p of answer choices q = &&a[0]; q = &&a; *q = *(&a[0]); q = &(*p);
Computers and Technology
1 answer:
emmainna [20.7K]3 years ago
8 0

Answer:

The valid operations are:

*q = *(&a[0]);  and q = &(*p);

Explanation:

Given

The above declarations

Required

The valid operations

*q = *(&a[0]);  and q = &(*p); are valid assignment operations.

However, q = &&a[0]; q = &&a; are invalid because:

The assignment operations intend to implicitly cast the char array a to pointer q. C++ does not allow such operation.

<em>Hence, *q = *(&a[0]);  and q = &(*p); are valid</em>

Another way to know the valid operations is to run the program and look out for the syntax errors thrown by the C++ compiler

You might be interested in
Your revenue is $22,000. Your Cost of Goods is 16,250. Your gross profit is _____________, fill in the blank,.
MaRussiya [10]

Answe5750

Explanation:

7 0
3 years ago
True or False
OverLord2011 [107]

Answer:False

Explanation:

7 0
3 years ago
A company has four departments: A, B, C, and D. The number of IP addresses required by each department is 100, 60, 20, and 26 re
Alex777 [14]

Answer:

deeppppuhjjuuiiijjjjk

6 0
3 years ago
To edit the text in a smartart graphic, what must be done first ?
ICE Princess25 [194]
C Hope this helps :D
8 0
3 years ago
Read 2 more answers
Look at the following description of a problem domain:The bank offers the following types of accounts to its customers: saving a
Alchen [17]

Answer:

The answers are explained below

Explanation:

1) Identify the potential classes in this problem domain be list all the nouns

class Customer

class Acco  unt

2) Refine the list to include only the necessary class names for this problem

the class customer is not necessary to solve the problem itself, therefore the only class could be the account class

3) Identify the responsibilities of the class or classes.

The responsibilities of the class account will be

* determination of the type of account--> Acc  ount . type(char)

*  deposit money into the account --> Acc  ount . de posit(float)

* withdraw money into the account --> Acc  ount . with draw(float)

* show balance of the account --> Acc  ount . bal ance()

* generate interest --> Acc  ount . int erest()

Please join the words together. I used spaces due to regulations

5 0
4 years ago
Other questions:
  • According to the ________ definition of organizations, an organization is seen as a means by which primary production factors ar
    14·1 answer
  • What problem does chlorofluorocarbon (CFC) create?
    5·1 answer
  • 14. Which of the following statements is true? A. The most secure email message authenticity and confidentiality isprovided by s
    11·1 answer
  • Differences of a desktop computer and a laptop
    13·1 answer
  • What is a resume?A collection of all your professional and artistic works.A letter which explains why you want a particular job.
    6·1 answer
  • Ray is recording his voice for a presentation and can adjust the bit depth. Increasing the bit depth will mean that sound is sam
    12·1 answer
  • 2. What is software conflict?<br>​
    11·1 answer
  • Bcr is an out put device true or false​
    13·2 answers
  • What do you do when you have computer problems? Check all that apply. PLEASE HELP
    9·2 answers
  • Help me. thank you very much
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!