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
Which of the following not a hardware componet​
erma4kov [3.2K]

Answer:

antivirus.......hope this answers your question

3 0
3 years ago
What is the use of html in websites
Alborosie
HTML is a very basic markup language and requires memorization of a few dozen HTML commands that structure the look and layout of a web page. Before writing <span>any HTML code or designing your first web page, you must decide on an HTML editor or text editor, such as Notepad or Word Pad.</span>
4 0
3 years ago
Read 2 more answers
What's the problem with this code ?
Svet_ta [14]
Hi,

I changed your program using some of the concepts you were trying to use. Hopefully you can see how it works:

#include <string>
#include <iostream>
#include <sstream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
   short T;
   cin >> T;
   cin.ignore();

   string str[100];

   for(int i=0; i<T; i++)
   {
      getline(cin, str[i]);
   }

   for (int i = 0; i < T; i++)
   {
      stringstream ss(str[i]);
      string tmp;
      vector<string> v;

      while (ss >> tmp)
      {
          // Let's capitalize it before storing in the vector
          if (!tmp.empty())
          {
              transform(begin(tmp), end(tmp), std::begin(tmp), ::tolower);
              tmp[0] = toupper(tmp[0]);
           }
           v.push_back(tmp);
        }

        if (v.size() == 1)
        {
           cout << v[0] << endl;
        }
        else if (v.size() == 2)
        {
           cout << v[0][0] << ". "  << v[1] << endl;
        }
        else
        {
            cout << v[0][0] << ". " << v[1][0] << ". " << v[2] << endl;
        }
    }

     return 0;
}

4 0
3 years ago
Tumblr, Jaiku is an example of _____________ website.
adelina 88 [10]

Answer:

<h3><u>Microblogging </u></h3>

  • <u>One of the best-known channels in the microblogging world. Twitter is a quick and convenient way to share short posts, GIFs, article links, videos and more. Pinterest: Companies on Pinterest link to products, articles and other useful information for </u><u>audiences </u><u>.</u>

Explanation:

<h2>Hope this helps you !! </h2>
3 0
2 years ago
WILL GIVE BRAINLEST!!!!!!
Nataliya [291]

Answer:

a. divide the viewfinder into three equal, vertical divisions

Explanation:.

4 0
3 years ago
Read 2 more answers
Other questions:
  • An application ________ is anyone who writes a computer application for one or more platforms.
    5·1 answer
  • How can I make a website login system with only using php?​
    6·1 answer
  • Reply emailing a student who is asking about audio materials​
    6·2 answers
  • Imagine that you were hired to create the label for a new brand of soup. The client wants to emphasize that the soup has homemad
    10·1 answer
  • Please tell fast plzzzzzzzzzzz.​
    9·1 answer
  • The action of entering data into your computer. This can be text typed in a word processing document, keywords entered in a sear
    8·1 answer
  • PLEASE HELP! WILL MARK AS BRAINLIEST JavaScript can be implemented using the _________ HTML tags in a web page.​
    13·2 answers
  • What does an arrow after a command indicate
    13·2 answers
  • The Internet is a worldwide communications network. Which device connects computer networks and computer facilities?
    11·1 answer
  • The equals method of the Object class returns true only if the two objects being compared:_________
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!