C: Analysis of code

Could someone explain this code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  #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: programming language
Output: 2.00
prolaa 6

I tried debugging it with Code Blocks, but didn't understand how it works. It there some other tools for debugging in Code Block?

Thanks for replies.
>> It there some other tools for debugging in Code Block?

You can click on small "wheell" icon in your post above and it will lead you to online debugger:
http://cpp.sh/5dcg (HINT: click on "run")

In codeblocks you can use DBG for example. assuming your compiler is GCC?
Last edited on
Topic archived. No new replies allowed.