Answer:
The correct answer to the following question will be "Semantic and Syntax error".
Explanation:
<u>Syntax error: </u>
Corresponds to such a mistake in a pattern sentence structure that is composed in either a specific language of that same coding. Because computer programs have to maintain strict syntax to execute appropriately, any elements of code that would not adhere to the programming or scripting language syntax can result inside a syntax error.
<u>Semantic error: </u>
That would be a logical error. This is because of erroneous logical statements. Write inaccurate logic or code of a program, which results incorrectly whenever the directives are implemented.
So, it's the right answer.
Answer:
int count =0;
for(int i=0;i<10;i++)
{
if(myArray[i]>=0)
{
count++;
}
}
cout<<"Number of positive integers is "<<count<<endl;
Explanation:
The above written loop is for counting positive integers in the myArray[].
For counting we have taken a count integer initialized with 0.On iterating over the array if the element is greater than or equal to 0 we consider it as positive and increasing the count.At the end printing the count.
Answer:
Instance variables can be declared anywhere inside a class.
Although there isn't any rule to declare instance variables before methods, and they can be declared anywhere in the class, they cannot be declared inside method definitions of class.
///////////////////////////////////////////////////////////////////////////////////////////////////////////
<em>By convention class names begin with an uppercase letter, and method and variable names begin with a lowercase letter.</em> - True.
<em>Instance variables exist before methods are called on an object, while the methods are executing and after the methods complete execution.</em> - True.
<em>A class normally contains one or more methods that manipulate the instance variables that belong to particular objects of the class.</em> - True
Answer:
The cloud-based LinkedIn automation tool makes life easier for you by automating functions like sending connection requests, liking and commenting on posts, sending customized messages, and much more.