0
   

C: Analysis of code

 
 
gruba
 
Reply Sun 8 Mar, 2015 02:42 am
Could someone explain this C code step by step:

Code:#include <stdio.h>
#define MAX 10
int main()
{
char array[MAX][MAX], c = 0;
int d = 1, x = 0, i, j;
do scanf("%s", array[x]);
while (array[x++][0] != '0');
{
float* pf;
int xx, *pi = (int*)&array[0][7];
xx = ((*pi) & 0x41000000);
pf = (float*)&xx;
printf("%5.2f\n", *pf);
}
for (c-=--x; c++&**array; d+=!(c<<x>0)) d<<=1;
d -= c;
for (i = 0; i < x;
i==1?printf("%c ", array[i][x>>1]):i, ++i)
for (j = 0; j <= x - i;
printf("%c", array[i][j++]));
printf("%x", d);
return 0;
}


Example input:
Code:programming language 0

Output:
Code: 2.00
prolaa 6


I tried debugging the program with Code Blocks, but didn't understand how it works. Also, are there some special tools for debugging in Code Blocks?
Thanks for reply.
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 0 • Views: 166 • Replies: 0
No top replies

 
 

 
  1. Forums
  2. » C: Analysis of code
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.02 seconds on 05/18/2024 at 01:13:17