Concern over C++ for robotics exam question

Hello,

I believe this question is phrased in a very peculiar fashion:

In the image above, and based on how the question is worded, I believe I could argue why all are possible use cases of && (logical and operator) and || ( logical or operator )

The question is very broad in that it is asking what && and || are used for in conditional statements:

  1. For ignoring a condition: I could ignore a condition where TWO conditionals are not the same:
    If ( a == b ) && ( b == c )
    {
    I would argue that I am using this to ignore the condition where b == c
    }

  2. For testing multiple conditions: Arguably the same example above shows testing multiple conditions

  3. All of the above ( just here for verbosity )

  4. For filtering conditions: I feel like I could argue this case with the following:

// given a series of states: a, b, c
if ( ( a.running() || b.running() ) && ! c.running()
{
do something only when a OR b is running but c is not. Which seems like a case where we are “filtering” c out to only do something when a and/or b is running.
}

Granted I believe the actual answer is: For testing multiple conditions, but overall I think the verbage could use an adjustment to make the question more clear on what it is aiming to test ?

Anyways, thanks for my long winded comment/concern.

Another one came to my attention that I wanted to bring up.

In this question it asks which is not a proper way to declare an array. Technically all of them are proper ways to define an array. They all compile just fine.

I think the wording here is quite confusing as in “technically” we could argue that

int array[6]; // Declared but not in initilized
int array[6] = {4,8, ... }; // Declared and initilized
int array[] = {4,8, ... }; // Declared and initilized - though likely a bit less  helpful as the int array[] doesn't indicate the size of the array in its initilization.

So they are all a proper way to declare the array, and the none of these answer is phrased in such a way that it adds unnecessary double negatives into the question.

I believe that either the question should be rephrased, or the answer should be rephrased

  • which of the following statements is an improper way to declare an array in c++?
    • In which case the answers all make sense ( assuming that none of these is the correct answer )
  • which of the following statements is not a proper way to declare an array in c++?
    • In this case the answer should be rephrased from “None of these” to “All are correct”

But then again, this is just my opinion. Overall though while I have enjoyed other courses on this site, this one in particular has had a number of grammatical errors, and other phrasings similar to this one where I have had to spend the majority of my time just re-reading the question instead of just showing knowledge of the material.

Best

Hello @gotbordom,

Thank you very much for your detailed feedback. I’m creating an issue to ensure this is reviewed thoroughly and resolved in the coming days.

Best,

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.