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 is ponter?
FILE PROGRAMMING
What is a lookup table in c?
Explain what is output redirection?
Why do we use & in c?
Explain what is meant by high-order and low-order bytes?
What is string constants?
Tell me with an example the self-referential structure?
What is the use of f in c?
Why is struct padding needed?
What is #pragma statements?
What are the key features in c programming language?
Do you know the use of 'auto' keyword?
Write a code to determine the total number of stops an elevator would take to serve N number of people.
An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above