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
write a program that declares an array of 30 elements named "income" in the main functions. then cal and pass the array to a programmer-defined function named "getIncome" within the "getIncome" function, ask the user for annual income of 30 employees. then calculate and print total income on the screen using the following function: "void getIncome ( ai []);
What are the c keywords?
How can I copy just a portion of a string?
What are the loops in c?
What is the use of void pointer and null pointer in c language?
Why c is procedure oriented?
Can i use “int” data type to store the value 32768? Why?
What is header file in c?
What does typedef struct mean?
Which programming language is best for getting job 2020?
What is a union?
What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
What is function what are the types of function?
Explain what are multibyte characters?
How can I get the current date or time of day in a c program?