abcdedcba
abc cba
ab ba
a a
Answers were Sorted based on User's Feedback
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 |
main() { char a[4]="HELLO"; printf("%s",a); }
Write a Program that Inputs 10 Numbers in an Array and Show the Maximum Number
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
#include<stdio.h> #include<conio.h> void main() { int a=(1,2,3,(1,2,3,4); switch(a) { printf("ans:"); case 1: printf("1");break; case 2: printf("2");break; case 3: printf("1");break; case 4: printf("4");break; printf("end"); } getch(); }
How to access command-line arguments?
What is the problem with the following code segment? while ((fgets(receiving array,50,file_ptr)) != EOF) ;
String copy logic in one line.
Print an integer using only putchar. Try doing it without using extra storage.
typedef struct error{int warning, error, exception;}error; main() { error g1; g1.error =1; printf("%d",g1.error); }
write a program for area of circumference of shapes
main() { int i=400,j=300; printf("%d..%d"); }
#ifdef something int some=0; #endif main() { int thing = 0; printf("%d %d\n", some ,thing); }