abcdedcba
abc cba
ab ba
a a

Answers were Sorted based on User's Feedback



abcdedcba abc cba ab ba a a..

Answer / sachinb

Give me answer

Is This Answer Correct ?    2 Yes 1 No

abcdedcba abc cba ab ba a a..

Answer / p.pratyusha

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int i=5,q,n=-1,r;
for(q=0;q<i;q++)
{
char ch='A';
for(int j=0;j<i;j++)
{
cout<<ch;
++ch;
}
if(n>0)
{
for(int k=n;k>0;k--)
{
cout<<" ";
}
}
for(r=0;r<i-1;r--)
{
ch--;
cout<<ch;

}
cout<<endl;
n+=2;
--i;
}
}

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More C Code Interview Questions

#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }

1 Answers  


main() { int i=5,j=10; i=i&=j&&10; printf("%d %d",i,j); }

1 Answers  


How to palindrom string in c language?

6 Answers   Google,


main() { { unsigned int bit=256; printf("%d", bit); } { unsigned int bit=512; printf("%d", bit); } } a. 256, 256 b. 512, 512 c. 256, 512 d. Compile error

1 Answers   HCL,


main() { int i=-1; +i; printf("i = %d, +i = %d \n",i,+i); }

1 Answers  






Sorting entire link list using selection sort and insertion sort and calculating their time complexity

1 Answers   Infosys, Microsoft, NetApp,


Predict the Output: int main() { int *p=(int *)2000; scanf("%d",2000); printf("%d",*p); return 0; } if input is 20 ,what will be print

2 Answers  


how can i search an element in an array

2 Answers   CTS, Microsoft, ViPrak,


What is the output of the program given below main() { signed char i=0; for(;i>=0;i++) ; printf("%d\n",i); }

1 Answers  


main() { int i, j; scanf("%d %d"+scanf("%d %d", &i, &j)); printf("%d %d", i, j); } a. Runtime error. b. 0, 0 c. Compile error d. the first two values entered by the user

2 Answers   HCL,


main() { char p[ ]="%d\n"; p[1] = 'c'; printf(p,65); }

2 Answers  


#ifdef something int some=0; #endif main() { int thing = 0; printf("%d %d\n", some ,thing); }

1 Answers  


Categories