- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
#include <stdio.h>
int main(void)
{
(
*********************
** ** ** ***** *
* ** * **** ** *** **
* ** * **** *** * ***
* ** * **** **** ****
* ** * **** *** * ***
* ** ** *** *** **
*********************
printf)("pidor");
}
Конь систентно!
То есть *printf сначала превращает функцию в указатель, а затем обратно в функцию.
EDIT: Ну да:
6.3.2.1/4
A function designator is an expression that has function type. Except when it is the operand of the sizeof operator, the _Alignof operator, or the unary & operator, a function designator with type ''function returning type'' is converted to an expression that has type ''pointer to function returning type''.
6.5.3.2/4
The unary * operator denotes indirection. If the operand points to a function, the result is a function designator; if it points to an object, the result is an lvalue designating the object. If the operand has type ''pointer to type'', the result has type ''type''. If an invalid value has been assigned to the pointer, the behavior of the unary * operator is undefined
Вот бы и с амперсандами так тоже можно было.