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
In a large kitchen what is meant by the partie system? Who devised this system?
denis-greek [22]

Answer:

While at the Savoy in London, Escoffier formally introduced his army-influenced organisational method to the kitchens there. It became known as the Chef de partie system, and the idea was to avoid duplication of tasks, and to make communication between the various staff members easier.

8 0
3 years ago
How do you activate the Slicer Tools contextual tab?
Strike441 [17]

Answer:

i need this one too

Explanation:

4 0
3 years ago
Which are the two alternatives for pasting copied data in a target cell or a group of cells ?
dlinn [17]
First, you click and drag the letters/images you wanna copy, you do Ctrl + C then you clikc another cell until you get the flashing line, do Ctrl + V and there you go
4 0
4 years ago
Read 2 more answers
If you are creating a new document that you know will be turned into a Web page, it is a good idea to start in _____.
Lina20 [59]
I think you should start in Web layout
7 0
3 years ago
Implement a function inValues() that asks the user to input a set of nonzero floating-point values. When the user enters a value
elena-s [515]

Answer:

Explanation:

The following is written in Python and uses exception handling to do exactly as requested. It then goes adding all of the integer values to an array called num_list and finally adding them all together when the function ends.

def in_values():

   num_list = []

   while True:

       try:

           num = input("Input non-zero floating point: ")

           num = int(num)

           if num == 0:

               break

           else:

               num_list.append(num)

       except ValueError:

           print("No valid integer! Please try again ...")

           try:

               num = input("Input non-zero floating point: ")

               num = int(num)

               break

           except ValueError:

               break

   sum = 0

   for number in num_list:

       sum += number

   return sum

5 0
3 years ago
Other questions:
  • When might it be necessary or advisable to write a shell script instead of a shell function? give as many reasons as you can thi
    15·1 answer
  • What type of camera is a cell phone camera
    14·2 answers
  • For most applications, saving sound files at the _____ bit resolution provides a good balance of sound quality and file size.
    15·2 answers
  • Encryption has a remarkably long and varied history. Spies have been using it to convey secret messages ever since there were se
    7·1 answer
  • You have just installed a new sound card in your system, and Windows says the card installed with no errors. When you plug up th
    5·1 answer
  • Whoever answers int the next 15 minutes will get brainliest. To get brainliest, it also has to be the correct answer. 8 points r
    11·2 answers
  • Database software lets the user sort information alphabetically, chronologically, or numerically. Which is NOT a commonly used d
    7·1 answer
  • Media applications that play audio or video files are part of a class of workkloads called "streaming" workloads (i.e., they bri
    9·1 answer
  • How to do row of circles in phyton programming ?
    11·1 answer
  • Which three characteristics help identify a business opportunity? (Choose three)
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!