Answer:
There are two ways to print 1 to 1000
- Using Loops.
- Using Recursion.
Explanation:
Using loops
for(int i=1;i<=1000;i++)
{
cout<<i<<" ";
}
Using recursion
Remember you can implement recursion using a function only.
void print(int n)
{
if(n==0)
return;
print(n-1);
cout<<n<<" "';
}
you should pass 1000 as an argument to the function print.
Answer:
CPU, input unit, Output unit, memory unit
We use ideas and thoughts that have already been protected by the law which is called Copyright. We reworking copyright material means we are taking somebody's ideas and calling it ours. Which is not right by the law.
Answer:
The answer is "option B".
Explanation:
In the C++ programming language, it is legal to pass a parameter in the method that includes an individual array element. where an array is a collection of homogeneous (similar types of) elements. and other options are not correct that can be defined as:
- In option, a Passing argument in a function is not illegal in c++.
- In option c, It is recommended by the ANSI committee.
- In option d, It is good for practice in coding.