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 |
#include<stdio.h> main() { struct xx { int x=3; char name[]="hello"; }; struct xx *s; printf("%d",s->x); printf("%s",s->name); }
Write a program to print a square of size 5 by using the character S.
main() { char name[10],s[12]; scanf(" \"%[^\"]\"",s); } How scanf will execute?
main() { int k=1; printf("%d==1 is ""%s",k,k==1?"TRUE":"FALSE"); }
void main() { printf(“sizeof (void *) = %d \n“, sizeof( void *)); printf(“sizeof (int *) = %d \n”, sizeof(int *)); printf(“sizeof (double *) = %d \n”, sizeof(double *)); printf(“sizeof(struct unknown *) = %d \n”, sizeof(struct unknown *)); }
main() { if ((1||0) && (0||1)) { printf("OK I am done."); } else { printf("OK I am gone."); } } a. OK I am done b. OK I am gone c. compile error d. none of the above
main() { int i=0; while(+(+i--)!=0) i-=i++; printf("%d",i); }
9 Answers CSC, GoDB Tech, IBM,
main() { if (!(1&&0)) { printf("OK I am done."); } else { printf("OK I am gone."); } } a. OK I am done b. OK I am gone c. compile error d. none of the above
write a program in c language to get the value of arroy keys pressed and display the message which arrow key is pressed?
main() { unsigned int i=65000; while(i++!=0); printf("%d",i); }
main() { float f=5,g=10; enum{i=10,j=20,k=50}; printf("%d\n",++k); printf("%f\n",f<<2); printf("%lf\n",f%g); printf("%lf\n",fmod(f,g)); }
respected sir, i did my MCA in 2013 when i am going to attend to an interview i was asked about my project how will i explain my project could please help me in this and my project title is "Social Networking Site For Social Responsibility"