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

How main function is called in c?

0 Answers  


How would you write qsort?

1 Answers  


I have an array of 100 elements. Each element contains some text. i want to: append a star character to the end of every fifth element remove every second character from every tenth element, and… add a line feed (ascii 10) after the 30th character of every array element whose length is greater than 30 characters.

1 Answers  


What is %lu in c?

0 Answers  


Write a program to compute the similarity between two strings - The program should get the two strings as input - Then it will output one single number which is the percentage of similarity between the two strings

0 Answers  






What is the function of ceil(X) defined in math.h do? A)It returns the value rounded down to the next lower integer B)it returns the value rounded up to the next higher integer C)the Next Higher Value D)the next lower value

3 Answers   Accenture, Wipro,


Program to find larger of the two numbers without using if-else,while,for,switch

11 Answers   iNautix, Wipro,


what is data structure?

5 Answers   CBSE,


What is use of integral promotions in c?

0 Answers  


write a c/c++ program that takes a 5 digit number and calculates 2 power that number and prints it?

4 Answers  


How to print India by nested loop? I IN IND INDI INDIA

4 Answers   NIIT, Wipro,


Explain what is meant by 'bit masking'?

0 Answers  


Categories