main()
{
char s[ ]="man";
int i;
for(i=0;s[ i ];i++)
printf("\n%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]);
}
Answer / susie
Answer :
mmmm
aaaa
nnnn
Explanation:
s[i], *(i+s), *(s+i), i[s] are all different
ways of expressing the same idea. Generally array name is
the base address for that array. Here s is the base address.
i is the index number/displacement from the base address.
So, indirecting it with * is same as s[i]. i[s] may be
surprising. But in the case of C it is same as s[i].
| Is This Answer Correct ? | 37 Yes | 7 No |
how can u draw a rectangle in C
53 Answers Accenture, CO, Codeblocks, Cognizant, HCL, Oracle, Punjab National Bank, SAP Labs, TCS, University, Wipro,
x=2 y=3 z=2 x++ + y++; printf("%d%d" x,y);
There are 21 people in a room. They have to form groups of 3 people each. How many combinations are possible? Write a C program to print the same.
C program to print magic square of order n where n > 3 and n is odd
void main() { int i=i++,j=j++,k=k++; printf(“%d%d%d”,i,j,k); }
main() { main(); }
main() { int i=5; printf(“%d”,i=++i ==6); }
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)); }
write a c-program to find gcd using recursive functions
Can you send Code for Run Length Encoding Of BMP Image in C Language in linux(i.e Compression and Decompression) ?
union u { struct st { int i : 4; int j : 4; int k : 4; int l; }st; int i; }u; main() { u.i = 100; printf("%d, %d, %d",u.i, u.st.i, u.st.l); } a. 4, 4, 0 b. 0, 0, 0 c. 100, 4, 0 d. 40, 4, 0
void main() { if(~0 == (unsigned int)-1) printf(“You can answer this if you know how values are represented in memory”); }