Answer Posted / raj
#define subscript 5
void spiral()
{
int a[subscript][subscript],i,j,k,l,m,p,q;
p=q=subscript ;
for(i=0;i<p;i++,p--)
{
for(j=i;j<n-1;j++)
printf("%d",a[i][j]);
for(k=i;k<j;k++)
printf("%d",a[k][j]);
for(l=k;l>i;l--)
printf("%d",a[l][k]);
for(m=k;m>i;m--)
printf("%d",a[i][m]);
}
if(q%2!=0)
printf("%d",a[j][j]);
}
Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Explain what could possibly be the problem if a valid function name such as tolower() is being reported by the c compiler as undefined?
What is wild pointer in c?
Write the test cases for checking a variable having value in range -10.0 to +10.0?
What does static variable mean in c?
What is New modifiers?
What is a void * in c?
Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10
Describe dynamic data structure in c programming language?
What are the different types of control structures?
Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.
How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?
Give basis knowledge of web designing ...
Can we use any name in place of argv and argc as command line arguments?
What is clrscr in c?
What was noalias and what ever happened to it?