Answer:
The program to this question as follows:
Program:
//header file iostream
#include<iostream> //including file for use basic function
//using name space
using namespace std;
//main method
int main() //defining main method
{
int a[3][3]; //defining two dimension array
int x,y,sum=0; //defining variables
cout<<"Enter array elements: "<<endl; //message
for(x=0;x<3;x++) // for row
{
for(y=0;y<3;y++) //for column
{
cin>>a[x][y]; //input values from user.
}
}
//loop for calculting sum.
for(x=0;x<3;x++)
{
for(y=0;y<3;y++)
{
sum=sum+a[x][y];//add all elements
}
}
cout<<"Sum: "<<sum; //print sum.
return 0;
}
Output:
Enter array elements:
1
2
3
4
5
6
7
8
9
Sum: 45
Explanation:
In the above C++ programming language code first, a header file is included then the main method is declared, inside a main method 2D array that is "a[][]", and an integer variable is defined that are "i, j, and sum". In the next line for loop is used, this loop is used two times that can be described as follows:
- The first time it is used for inserting elements from user ends.
- The second time, it uses the sum variable to add all array elements. and in the last print function that is "cout" is used for print sum variable value.
Keep the first hard drive then override it insert the second one and memory goes into the second one
Def firstChars( word ):
if( word ): # make sure word has characters
print( word[ 0 ] ) # print the first character (Python 3 syntax)
Answer:
None of the mentioned options
Explanation:
- If we define a method in a derived class with same declaration type as that of base class then it is said to be overriding a function which behaves differently which will depend on the object which is calling the method.
- Option a,b and c are not any kind of methods we implement using coding.
- Option d is done when number or data types of parameters are different than the declaration of the base type.
Answer:
iv. all of the given options
Explanation:
This is the correct answer because this is what happens when software is restructured.
<em>PLEASE</em><em> </em><em>DO MARK</em><em> </em><em>ME AS</em><em> </em><em>BRAINLIEST</em><em> </em><em>IF</em><em> </em><em>MY ANSWER</em><em> </em><em>IS HELPFUL</em><em> </em><em>;</em><em>)</em><em> </em>