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 / ramesh k

#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char name[20];
int a;

clrscr();
printf("enter the INDIA name");
scanf("%c",&name);
a=strlen(name);
for(int i=0;i<=a;i++)
{
for(int j=0;j<=i;j++)
{
printf("%c",name[i]);
}
printf("\n");
}
getch();
}

Is This Answer Correct ?    1 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the concept and use of type void.

1060


For what purpose null pointer used?

1011


Where is c used?

1034


Explain what standard functions are available to manipulate strings?

1024


Why is this loop always executing once?

998


How is null defined in c?

1102


What are the functions to open and close the file in c language?

985


If fflush wont work, what can I use to flush input?

1051


Explain how do I determine whether a character is numeric, alphabetic, and so on?

1078


What Is The Difference Between Null And Void Pointer?

1156


Input is "rama loves rajesh and rajesh Loves rama also and rajesh wear gloves and bloves" To print output is count the numbers of times repeted the word love without case sensitive.

2009


What is structure packing in c?

1024


What is string function c?

967


In c programming language, how many parameters can be passed to a function ?

1052


What is signed and unsigned?

1014