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:
*
**
*
****
*
******
*
********
*
**********
use two nested loops.

Answers were Sorted based on User's Feedback



Write a Program to print this triangle: * ** * **** * ****** * ******** * ********** use ..

Answer / manoj

void main() {
int n = 5 ; // take use input here
int i, j;
for( i =1; i<=n; i++){
printf("\n *");
for(j=1; j<i; j++){
printf(" *");
}
}
}

Is This Answer Correct ?    8 Yes 13 No

Write a Program to print this triangle: * ** * **** * ****** * ******** * ********** use ..

Answer / vikram sharma

<?php
for($i=0;$i<10;$i++){
for($j=0;$j<=$i;$j++){
if($i%2!=0 || $i==0 || $j==1)
echo"*";

}
echo"</br>";
}
?>

Is This Answer Correct ?    7 Yes 12 No

Post New Answer

More C Interview Questions

what are the files which are automatically opened when a c file is executed?

3 Answers  


Write code for finding depth of tree

2 Answers   Adobe,


What is a #include preprocessor?

0 Answers  


#define MAX 3 main() { printf("MAX = %d ",MAX ); #undef MAX #ifdef MAX printf("Vector Institute”); #endif }

1 Answers   Vector India,


Tell us the difference between these two : #include"stdio.h" #include<stdio.h> define in detial.

5 Answers  


plz let me know how to become a telecom protocol tester. thank you.

0 Answers  


What is character set?

0 Answers  


SRUCTURE PROGRAMMING

3 Answers   CTS, Wipro,


What is multidimensional arrays

0 Answers  


.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }

0 Answers   Wilco,


If input is 123 then how to print 100 and 20 and 3 seperately?

4 Answers  


What is volatile variable how do you declare it?

0 Answers  


Categories