Write a program in c to print
1
121
12321
1234321
123454321
Answer Posted / durai
int a, b;
for( a=1;i<=5;a++)
{
for(b=1;b<=(2*a-1);b++)
{ if(b<=a)
printf b;
else
printf(2*a-b);
}
printf
;
}
| Is This Answer Correct ? | 0 Yes | 5 No |
Post New Answer View All Answers
Why is it that not all header files are declared in every C program?
#include show(int t,va_list ptr1) { int a,x,i; a=va_arg(ptr1,int) printf(" %d",a) } display(char) { int x; listptr; va_star(otr,s); n=va_arg(ptr,int); show(x,ptr); } main() { display("hello",4,12,13,14,44); }
How can you increase the size of a statically allocated array?
I have seen function declarations that look like this
What are the 4 types of programming language?
What is the use of #define preprocessor in c?
What is the heap in c?
What is FIFO?
Explain about the constants which help in debugging?
Can we declare a function inside a function in c?
What are high level languages like C and FORTRAN also known as?
When is a void pointer used?
what is the function of pragma directive in c?
Can stdout be forced to print somewhere other than the screen?
What is a pointer and how it is initialized?