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
fgiga [73]
3 years ago
6

Member function definitions: ______________.a. Always require the binary scope operator (::)b. Require the binary scope operator

only when being defined outside of the definition of their class c. Can use the binary scope operator anywhere, but become public functions d. Must use the binary scope operator in their function prototype
Computers and Technology
1 answer:
lilavasa [31]3 years ago
7 0

Answer:

Option (B) is the correct answer to the following questions.

Explanation:

The following option is correct because the binary scope operator is used to define the global variable only when the local variable has also the same name and we want to use global variable also or we also use scope operate when we do not want to use any function inside the class.

The following option (A) is wrong because we not always required binary scope operator and the option (C) is wrong because we cannot use the scope operator anywhere and the option (d) is already wrong because that binary scope operator would not be used in the function prototype.

You might be interested in
Reverse Word Order: Write a program that reverses the order of the words in a given sentence. This program requires reversing th
Lerok [7]

Answer:

The program in C++ is as follows:

#include <bits/stdc++.h>

using namespace std;

int main(){

string sentence,word="";

getline (cin, sentence);

vector<string> for_reverse;

for (int i = 0; i < sentence.length(); i++){

 if (sentence[i] == ' ')  {

  for_reverse.push_back(word);

  word = "";  }

 else{    word += sentence[i];}  }

for_reverse.push_back(word);

sentence="";

for (int i = for_reverse.size() - 1; i > 0; i--){

 sentence+=for_reverse[i]+" ";}

sentence+=for_reverse[0];

cout<<sentence<<endl;

return 0;

}

Explanation:

This declares sentence and word as strings; word is then initialized to an empty string

string sentence,word="";

This gets input for sentence

getline (cin, sentence);

This creates a string vector to reverse the input sentence

vector<string> for_reverse;

This iterates through the sentence

for (int i = 0; i < sentence.length(); i++){

This pushes each word of the sentence to the vector when space is encountered

<em>  if (sentence[i] == ' ')  { </em>

<em>   for_reverse.push_back(word);</em>

Initialize word to empty string

  word = "";  }

If the encountered character is not a blank space, the character is added to the current word

<em>  else{    word += sentence[i];}  } </em>

This pushes the last word to the vector

for_reverse.push_back(word);  

This initializes sentence to an empty string

sentence="";

This iterates through the vector

for (int i = for_reverse.size() - 1; i > 0; i--){

This generates the reversed sentence

 sentence+=for_reverse[i]+" ";}

This adds the first word to the end of the sentence

sentence+=for_reverse[0];

Print the sentence

cout<<sentence<<endl;

8 0
3 years ago
How do I cite a website?
Mila [183]

Last, First M. “Article Title.”Website Title. Website Publisher, Date Month Year Published. Web. Date Month Year Accessed.


3 0
4 years ago
Read 2 more answers
In what way do networks help to protect data?
kap26 [50]
Networks can provide a fire wall. What are the choices.
6 0
3 years ago
Read 2 more answers
Excel solver is the only method that one can utilize for automated linear programming solutions. True or False
klasskru [66]

Answer:

False

Explanation:

This is not true at all. This can be done with a wide variety of resources in the modern world. There is the CPLEX (IBM ILOG CPLEX Optimization Studio) software, which was developed by Robert E. Bixby in 1988, it passed to several other companies and it was later sold to IBM in January 2009. Today it's one of the world's most effective programs when it comes to automated linear programming solutions.

3 0
3 years ago
When we add suffix L to a integer it is called as __________​
IRISSAK [1]

Answer:

Long integer literal.

Explanation:

Integer literal can be defined as numbers that do not contain any decimal point or augmented part. An integer literals can be characterized as decimal, octal, or hexadecimal constant. When an integer liteal is added with prefix it tends to define its base, whereas suffix define its type.

The suffix L to an integer literal means long integer literal. The suffix can be written in any form, either upper case (L) or lower case (l).

Therefore, the correct answer is long integer literal.

5 0
3 years ago
Other questions:
  • Where does the VLookup function find its lookup values?
    14·1 answer
  • HTML code must be enclosed in the _______ (angle brackets) so the browser can tell the difference between code and content you w
    6·2 answers
  • If you see ##### in a cell, you should
    10·1 answer
  • Convert 1001101012 to base 10
    5·1 answer
  • Killer app is BEST described as:
    5·1 answer
  • When you are cut off in traffic by another driver and you respond by “flipping him the bird,” you are using a type of gesture ca
    7·1 answer
  • Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te
    13·1 answer
  • Cine stie repede va rog mult si repede
    9·1 answer
  • Dealing with stress and strong emotions centeral idea​
    6·2 answers
  • How many basic elements of QBASIC are there
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!