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


Give the Output :
*
* *
* * *
* * * *

Answers were Sorted based on User's Feedback



Give the Output : * * * * * * * * * * ..

Answer / sakthipriya

#include<stdio.h>
#include<conio.h>
void main()
{
int n=4, c, k, space, count = 1;
space = n;
for ( c = 1 ; c <= n ; c++)
{
for( k = 1 ; k < space ; k++)
printf(" ");
for ( k = 1 ; k <= c ; k++)
{
printf("*");
if ( c > 1 && count < c)
{
printf(" ");
count++;
}
}
printf("\n");
space--;
count = 1;
}
getch();
}

Is This Answer Correct ?    0 Yes 0 No

Give the Output : * * * * * * * * * * ..

Answer / prasanna

int i,j;
for(i=o;i<4;i++)
{
for(j=0;j<=i;j++)
{
printf("*");
}
}

Is This Answer Correct ?    1 Yes 6 No

Post New Answer

More C Interview Questions

Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?

0 Answers   Genpact,


What is variable initialization and why is it important?

0 Answers  


What are multibyte characters?

0 Answers  


Why do we use main function?

0 Answers  


What are run-time errors?

0 Answers  


What is the difference between union and anonymous union?

0 Answers   Hexaware,


How are 16- and 32-bit numbers stored?

0 Answers  


What is sizeof return in c?

0 Answers  


Write a program for Overriding.

0 Answers  


List some of the static data structures in C?

0 Answers  


Why can’t constant values be used to define an array’s initial size?

0 Answers  


How are pointers declared in c?

0 Answers  


Categories