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

Can a pointer be null?

975


If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402

3847


What is s or c?

1014


plz let me know how to become a telecom protocol tester. thank you.

2139


Explain what is the difference between null and nul?

1081


What is a substring in c?

997


When should volatile modifier be used?

953


How are strings stored in c?

972


a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above

1069


Differentiate between Macro and ordinary definition.

1272


main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none

1301


What is function in c with example?

1087


Can we use any name in place of argv and argc as command line arguments?

1011


Is there any data type in c with variable size?

1032


Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?

1200