write a program to produce the following output;
ABCDEFGFEDCBA
ABCDEF FEDCBA
ABCDE EDCBA
ABCD DCBA
ABC CBA
AB BA
A A
Answer Posted / karthikeyan.cse ist year.skce
main()
{
int i,n=65,m=72,f=0,s=-6;
clrscr();
while(m-->=n)
{
s+=4;
for(i=n;i<m;i++)
{
printf("%c ",i);
}
}
if(f==0)
{ ++m;
}
else{
for(i=0;i<s;i++) printf(" ");
{
for(i=m-1;i>=n;i--)
{
printf("%c ",i);
}
}
printf("\n");f=1;
}
}
getch();
| Is This Answer Correct ? | 11 Yes | 9 No |
Post New Answer View All Answers
Explain what is the difference between functions abs() and fabs()?
What is the meaning of typedef struct in c?
What is maximum size of array in c?
Write a program to swap two numbers without using the third variable?
Can we change the value of constant variable in c?
What are the uses of null pointers?
What are the various types of control structures in programming?
What are qualifiers?
Why do some versions of toupper act strangely if given an upper-case letter?
#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); }
What are enums in c?
What is the use of ?
hello freinds next week my interview in reliance,nybody has an idea about it intervew questions..so tell
Is there a way to jump out of a function or functions?
Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.