12344321
123 321
12 21
1 1 how i print this program??

Answer Posted / venkat

#include<stdio.h>
void main()
{
int i,j,k=4,n=4;
for(i=0;i<n;i++)
{
for(j=1;j<=n-i;j++)
{
printf("%d",j);
}
printf(" ");
for(j=0;j<n-i;j++)
{
printf("%d",k-j);
//k--;
}
--k;
printf("
");
}

}

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain threaded binary trees?

670


What are the benefits of c language?

639


What is a string?

658


What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?

803


Can a variable be both const and volatile?

663






Explain null pointer.

615


Distinguish between actual and formal arguments.

582


What are the types of operators in c?

606


Why do we use int main instead of void main in c?

609


Tell me the use of bit field in c language?

622


What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?

736


Do you have any idea about the use of "auto" keyword?

658


#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }

774


What are variables and it what way is it different from constants?

775


Differentiate between ordinary variable and pointer in c.

611