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
jonny [76]
3 years ago
6

Which of the following is not a valid variable name? 2 myInt 2. return 3. myInteger 4. total3

Computers and Technology
1 answer:
Reptile [31]3 years ago
5 0

Answer:

Correct answer is option (2) that is "return".

Explanation:

In any programming language, a variable name can be made up of letters (lower and upper case) and digits. we can also use "_" underscore character for declaring the variables but we cannot use any special character like “$”.We cannot use digits in the beginning of variables name. And we also cannot use reserved keywords of the language like "new","return","while" etc. There should not be space between the variable names. Options 1, 3 and 4 are not violating any of these properties. But in option (2), "return" is a reserved keyword. That is why it is not a valid variable name.

Some example of valid variables name:

foo

BAZ

Bar

_foo42

foo_bar

Some example of invalid variables name:

$foo    ($ not allowed)

while   ( keywords )

2foo    (started with digit)

my foo  (spaces )

You might be interested in
Why does my smoke detector keep beeping even after i change the battery?.
UkoKoshka [18]

Sometimes they just beep for no reason or the batteries are faulty

8 0
2 years ago
// PrintStrings // Traverse the 2D character array "strings" and print each of the contained strings.// See the example outputs
anzhelika [568]

Answer:

C++.

Explanation:

void printStrings(char strings[NUM_STRINGS][STRING_LENGTH]) {

   // Multi dimension array can be traversed through multi-level loops

   for (int i = 0; i < NUM_STRINGS; i++) {

       for (int j = 0; j < STRING_LENGTH; j++) {

           cout<<"<<strings[i][j]<<";

       }

       cout<<endl;

   }

}

Output would be like this, depending on the size of NUM_STRINGS;

"One"

"Two"

"Three"

....

6 0
3 years ago
A section at the top of the page that makes it easy for the recipient to respond to a letter is called a(n
Umnica [9.8K]

Answer:

Address block.

Explanation:

7 0
3 years ago
Given the following function definition:
neonofarm [45]

The question is incomplete! Complete question along with its step by step answer is provided below!

Question:

Given the following function definition:

void calc (int a, int& b)

{

int c;

c = a + 2;

a = a * 3;

b = c + a;

}

x = 1;

y = 2;

z = 3;

calc(x, y);

cout << x << " " << y << " " << z << endl;

What is the output of the following code fragment that invokes calc?

a. 1 2 3

b. 1 6 3

c. 3 6 3

d. 1 14 9

e. None of these

Answer:

b. 1 6 3

Explanation:

In the given problem we have a function void calc which takes two input arguments a and b and updates its values according to following equations

c = a + 2;

a = a * 3;

b = c + a;

Then we call this function calc(x,y) by providing test values of

int x = 1;

int y = 2;

int z = 3;

and the output returns the values of x, y and z

cout << x << " " << y << " " << z << endl;

Lets find out what is happening here!

When the program runs we provide x=a=1 and y=b=2

c=a+2=1+2=3

a=a*3=1*3=3

b=c+a=3+3=6

So the updated values of a=x=3 and b=y=6?

NO!

The updated values are a=x=1 and b=y=6

WHY?

There are two ways to pass values

1. Pass by values -> value cannot change  (int a)

2. Pass by reference -> value can change (int& b)

Look at the function void calc (int a, int& b) ;

Here we are passing (int a) as a value and (int& b) as a reference, therefore x remains same x=1 and y gets changed to updated value y=6 and z remains same as z=3 since it wasnt used by function calc(x,y)

The right answer is:

b. 1 6 3

x=1, y=6, z=3

4 0
3 years ago
In a flow chart, both the decision structure and the repetition structure use the diamond symbol to represent the condition that
leonid [27]

Answer:

Option A(True) is the correct answer for the above question.

Explanation:

  • The flowchart is used to give the solution of a problem through the diagram in a step by step processor. It helps the user to understand the solution easily. For diagram, it uses many types of symbols that are fixed for every sequence just like An oval symbol represents the start and end of the flowchart which is fixed for every flowchart.
  • So for the decisions in a flowchart, the diamond symbol is used which is to make the decisions and it has two sides-- one is true and the other is false.
  • The decisions are used also to represent the loop structure which is also called the repetition structure because the loop is controlled by the help of decisions so the diamond box is also used for the loop
  • The above question-statement says that the decisions-controlled is used for the loop and for the decisions which are true because it is also described above.
8 0
3 years ago
Other questions:
  • The checksum doesn't compute for a packet sent at the Internet Protocol (IP) level. What will happen to the data?
    14·1 answer
  • In steps<br> Urgent please
    14·1 answer
  • Write a method named lastFirst that accepts a string as its parameter representing a person's first and last name. The method sh
    13·1 answer
  • Which of the following is the main consideration when choosing an appropriate outlet box?
    7·2 answers
  • Managing your calendar and emails can be easily accomplished through ___ software
    8·1 answer
  • ____ are programs that need to be attached to other files to install themselves on computers without the users’ knowledge or per
    5·1 answer
  • How to code on python
    8·2 answers
  • Which of the following statements about the break statement is false? Group of answer choices Common uses of the break statement
    12·1 answer
  • Karl comes across confidential information. What should he do with it? A. Manipulate the information in his favor B. Sell the in
    12·1 answer
  • What is the output?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!