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 / chaitanya

#include<stdio.h>
void main()
{
int s,i,j,n=1;
printf("enter the length of the sequence
");
scanf("%d",&s);
for(i=1;i<=s;i++)
{
for(j=1;j<=i;j++)
{
printf("%d",j);
}
printf(" ");
}
}

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are multidimensional arrays?

1126


What are the keywords in c?

1134


Explain logical errors? Compare with syntax errors.

1082


Explain what is the difference between functions getch() and getche()?

1064


What is wild pointer in c with example?

1072


What is the difference between variable declaration and variable definition in c?

1066


What is pointer to pointer in c with example?

1085


Explain what is the general form of a c program?

1106


What is the difference between pure virtual function and virtual function?

1137


FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above

1128


differentiate built-in functions and user – defined functions.

1101


Which programming language is best for getting job 2020?

1060


Does * p ++ increment p or what it points to?

1135


What are preprocessor directives in c?

1109


What is the difference between a function and a method in c?

1095