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
void main(int n) { if(n==0) return; main(--n); printf("%d ",n); getch(); } how it work and what will be its output...............it any one know ans plz reply
How can I recover the file name given an open stream?
illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question
What are the two types of functions in c?
which of the following is not a character constant a) 'thank you' b) 'enter values of p, n ,r' c) '23.56E-o3' d) all of the above
What does it mean when a pointer is used in an if statement?
Explain what is the benefit of using #define to declare a constant?
PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE
How do shell structures work?
What is the use of putchar function?
What is "Hungarian Notation"?
What is difference between main and void main?
Write a program to show the change in position of a cursor using c
provide an example of the Group by clause, when would you use this clause
Can we declare variables anywhere in c?