write a program whose output will be-
1
12
123
1234
Answer Posted / abhishek
#include <iostream>
using namespace std;
int main() {
int i,c=1,p=0;
for(i=0;i<4;i++){
p=p*10+c;
cout<<p<<"
";
c++;
}
return 0;
}
| Is This Answer Correct ? | 1 Yes | 7 No |
Post New Answer View All Answers
What are the 32 keywords in c?
How can I read/write structures from/to data files?
What is the main difference between calloc () and malloc ()?
Explain how do you determine the length of a string value that was stored in a variable?
What is the best way to store flag values in a program?
What is meant by recursion?
how to introdu5ce my self in serco
How can a program be made to print the name of a source file where an error occurs?
What is the -> in c?
By using C language input a date into it and if it is right?
What is the size of enum in c?
How many parameters should a function have?
Is c a great language, or what?
What is strcmp in c?
What is ambagious result in C? explain with an example.