Answer Posted / vaishnavi
#include<iostream.h>
void main()
{
int i,n;
cout<<"Enter the number:"
cin>>n;
for(i=2*(n-1);i>=1;i=i-2)
{
cout<<i;
}
}
Is This Answer Correct ? | 8 Yes | 8 No |
Post New Answer View All Answers
How would you call C functions from C++ and vice versa?
What is runtime errors c++?
Write about the members that a derived class can add?
Suppose that data is an array of 1000 integers. Write a single function call that will sort the 100 elements data [222] through data [321].
What is virtual function? Explain with an example
Array base access faster or pointer base access is faster?
What is c++ hiding?
Explain virtual destructor?
Show the declaration for a static member variable.
How the keyword struct is different from the keyword class in c++?
Give the difference between the type casting and automatic type conversion. Also tell a suitable C++ code to illustrate both.
What is using namespace std in c++?
Inline parameters : What does the compiler do with the parameters of inline function, that can be evaluated in runtime ?
What does ios :: app do in c++?
What is a breakpoint?