Write a program that his output * *** *****



Write a program that his output * *** *****..

Answer / srujitha

int main()
{
int n = 5;

for( int i = 0; i <= n; i = i + 2)
{
for( int j = 0; j<=i;j++)
{
printf("*");
}
printf(" ");
}

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More C Interview Questions

Why doesn't the code "a[i] = i++;" work?

4 Answers  


What is the basic structure of c?

0 Answers  


Write a program to show the change in position of a cursor using c

0 Answers  


We can draw a box in cprogram by using only one printf();& without using graphic.h header file?

4 Answers   NIIT,


How does #define work?

0 Answers  






What is the output of the following program #include<stdio.h> main() { int i=0; fork(); printf("%d",i++); fork(); printf("%d",i++); fork(); wait(); }

8 Answers   ADITI, Adobe,


Can we declare a function inside a function in c?

0 Answers  


Write a c program for sum of first n terms of the series S = 1 - (1/3) + (1/5) -(1/7) + (1/9) ......

2 Answers  


In C language, a variable name cannot contain?

0 Answers  


Write a code to generate divisors of an integer?

0 Answers   Ericsson,


a memory of 20 bytes is allocated to a string declared as char *s then the following two statements are executed: s="Etrance" l=strlen(s); what is the value of l ? a.20 b.8 c.9 d.21

4 Answers   TCS,


What are the difference between a free-standing and a hosted environment?

0 Answers   Infogain,


Categories