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
Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent
hi friends how r u as soon in satyam my interview is start but i m very confusued ta wat i do plz help me frndz wat can i do plz tell me some question and answers related with "C" which r asked in the interview .
Explain about the constants which help in debugging?
Why do we need volatile in c?
why do some people write if(0 == x) instead of if(x == 0)?
Explain is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
What is the use of getchar() function?
What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
Explain what will be the outcome of the following conditional statement if the value of variable s is 10?
any limit on the number of functions that might be present in a C program a) max 35 functions b) max 50 functions c) no limit d) none of the above
Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.
Why is c fast?
What is the use of volatile?
regarding pointers concept
Write a program to reverse a linked list in c.