Enclosed in number signs ######
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.
One of the founders of Foursquare is Dennis Crowley. The other is Naveen Selvadurai. I know you didn't ask for both but I wanted to give them to you just in case. I hope this helps! (:
Answer:
cyber-extortion
Explanation:
Ashley Baker has been the webmaster for Berryhill Finance only ten days when she received an e-mail that threatened to shut down Berryhill's website unless Ashley wired payment to an overseas account. Ashley was concerned that Berryhill Finance would suffer huge losses if its website went down, so she wired money to the appropriate account. The author of the e-mail successfully committed cyber-extortion.
Answer:
2. <em>A reference of type A can be treated as a reference of type B</em> - False
Base class or its objects are not related to their derived class (or its objects).
Explanation:
class A {
int a;
public A() {
a = 7;
}
}
class B extends A {
int b;
public B() {
b = 8;
}
}
///////////////////////////////////////////////////////////////////////////////////////////////////////
1. <em>After the constructor for class B executes, the variable a will have the value 7 </em>- True.
When an object of a derived class is declared, the constructor of base class is called before the constructor of derived class (is called).
3. <em>Both variables a and b are instance variables </em>- True.
Classes can have instance, or member, variables and methods.
4.<em> After the constructor for class B executes, the variable b will have the value 8</em> - True.
When object of class B is declared, its constructor was called, which initialized variable b to 8.