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 to print this triangle:
*
**
*
****
*
******
*
********
*
**********
Don't use printf statements;use two nested loops instead.
you will have to use braces around the body of the outer
loop if it contains multiple statements.

Answers were Sorted based on User's Feedback



Write a program to print this triangle: * ** * **** * ****** * ******** * ********** Don&..

Answer / dhanashree n.gavade

int i,j,m;
m=2;
for(i=0;i<5,i++)
{
putch('*');
putch('\n');
for(j=i;j<=j+m;j++)
putch('*');
m=j;
putch('\n');
}

Is This Answer Correct ?    15 Yes 6 No

Write a program to print this triangle: * ** * **** * ****** * ******** * ********** Don&..

Answer / rakesh

#include<stdio.h>
int main()
{
int i,j;
for(i=1;i<=10;i++){
if(i%2!=0)
printf("*\n");
else{
for(j=0;j<i;j++)
printf("*");
printf("\n");
}
}
return 0;
}

Is This Answer Correct ?    3 Yes 2 No

Write a program to print this triangle: * ** * **** * ****** * ******** * ********** Don&..

Answer / gana

{
int a,b=2,i;
char *s="\0";
for(i=0;i<5;i++)
{
for(a=0;a<5-i;a++)
putch(' ');
for(a=0;a<b;a++)
putch('*');
b+=2;
puts(s);
}
}

Is This Answer Correct ?    1 Yes 0 No

Write a program to print this triangle: * ** * **** * ****** * ******** * ********** Don&..

Answer / reshma m.

int i,j,m;
m=2;
for(i=0;i<5;i++)
{putch('*');
putch('\n');
for(j=0;j<m;j++)
{putch('*');
m+=2;
}
putch('\n');
}

Is This Answer Correct ?    4 Yes 5 No

Write a program to print this triangle: * ** * **** * ****** * ******** * ********** Don&..

Answer / yk humble

5 cls
10 rem to print triangle

Is This Answer Correct ?    0 Yes 1 No

Write a program to print this triangle: * ** * **** * ****** * ******** * ********** Don&..

Answer / rakesh

#include<stdio.h>
int main()
{
int i,j;
for(i=1;i<=10;i++){
if(i%2!=0)
{
putchar('*');
putchar('\n');
}
else{
for(j=0;j<i;j++)
putchar('*');
putchar('\n');
}
}
return 0;
}

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More C Interview Questions

What is the use of extern in c?

0 Answers  


How can I check whether a file exists? I want to warn the user if a requested input file is missing.

0 Answers  


there is two conditions , 1. while using for loop for printing 1 to 50 no's simulteneous 2. while using printf functios for printing 1 to 50 no's simulteneous with or without using variables who will take more time for compiling and execution? explain in details with reason?

1 Answers  


What are the Advantages of using macro

0 Answers  


What are the different data types in C?

0 Answers  


How can I copy just a portion of a string?

0 Answers  


biggest of two no's with out using if condition statement

8 Answers  


What are the different types of storage classes in C?

3 Answers  


What is boolean in c?

0 Answers  


What is signed and unsigned?

0 Answers  


which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above

0 Answers  


Total of how many functions are available in c?

3 Answers  


Categories