Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are the 32 keywords in c?

1140


How can I read/write structures from/to data files?

1012


What is the main difference between calloc () and malloc ()?

1230


Explain how do you determine the length of a string value that was stored in a variable?

1196


What is the best way to store flag values in a program?

1122


What is meant by recursion?

1099


how to introdu5ce my self in serco

2049


How can a program be made to print the name of a source file where an error occurs?

1265


What is the -> in c?

1062


By using C language input a date into it and if it is right?

1131


What is the size of enum in c?

1168


How many parameters should a function have?

1247


Is c a great language, or what?

1166


What is strcmp in c?

1210


What is ambagious result in C? explain with an example.

2695