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...

How to print India by nested loop?
I
IN
IND
INDI
INDIA

Answer Posted / ashim ghosh

#include<stdio.h>
#include<conio.h>
void main()
{
char arr[20]={"INDIA"};
int i,j;
for(i=0;i<=5-1;i++)
{
for(j=0;j<=i;j++)
{
printf("%c",arr[j]);
}
printf("\n")
}
getch();
}

Is This Answer Correct ?    18 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does c mean before a date?

1191


Why can arithmetic operations not be performed on void pointers?

1049


How pointer is different from array?

1088


What is double pointer in c?

1045


Explain what are the __date__ and __time__ preprocessor commands?

1131


What is cohesion in c?

984


How can I pad a string to a known length?

1038


What is variable and explain rules to declare variable in c?

1102


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

1158


Who developed c language and when?

1071


Is sizeof a keyword in c?

976


What are the types of c language?

1039


What is the difference between far and near ?

1199


What is the value of h?

1046


Explain how are portions of a program disabled in demo versions?

1124