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

How can I read and write comma-delimited text?

1123


Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix

2066


Implement bit Array in C.

1199


Why is c used in embedded systems?

1174


Why is it important to memset a variable, immediately after allocating memory to it ?

2133


What are the 4 types of functions?

1110


Can math operations be performed on a void pointer?

1105


List the different types of c tokens?

1120


Explain the concept and use of type void.

1167


Write a program for Overriding.

1214


Define Array of pointers.

1157


a program that can input number of records and can view it again the record

1960


Explain modulus operator. What are the restrictions of a modulus operator?

1059


What is binary tree in c?

1138


What is a pointer on a pointer in c programming language?

1189