Deciphering C Gibberish

If you have ever programmed in C or C++, you might have encountered some complex variable declarations like:

char *(*(**foo[][8])())[];
int (*(*foo)(void ))[3]

Wouldn’t it be great if we could just enter such complex declarations into some program and it could output its meaning in ‘plain English’ ?
For example:

char ** const * const x
"declare x as const pointer to const pointer to pointer to char"

Seems like there is a program made just for this – cdecl.

It can even do the opposite; that is, convert a declaration written in plain English to its equivalent code !

Tip: If you want to learn how to understand such declarations without any help, you may refer to this article.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s