?? ptr.c
字號:
/* Demonstration of declaring and using a pointer to a function.*/
#include <stdio.h>
/* The function prototype. */
double square(double x);
/* The pointer declaration. */
double (*ptr)(double x);
int main( void )
{
/* Initialize p to point to square(). */
ptr = square;
/* Call square() two ways. */
printf("%f %f\n", square(6.6), ptr(6.6));
return 0;
}
double square(double x)
{
return x * x;
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -