What is the memory allocated by the following definition ?
int (*x)();

Answers were Sorted based on User's Feedback



What is the memory allocated by the following definition ? int (*x)();..

Answer / dddhacker

Wrong!
Its a function pointer, therefore on a 32 bit platform for
example, 4 bytes are allocated for it.

Is This Answer Correct ?    13 Yes 2 No

What is the memory allocated by the following definition ? int (*x)();..

Answer / ningappa

The above code is function pointer declaration.So there is
no memory allocated as it is just declaration and no value
is being assigned to it........

Is This Answer Correct ?    6 Yes 3 No

Post New Answer

More C Interview Questions

Differentiate between ordinary variable and pointer in c.

0 Answers  


A SIMPLE PROGRAM OF GRAPHICS AND THEIR OUTPUT I WANT SEE WAHAT OUTOUT OF GRAPHICS PROGRAM

0 Answers   HCL,


How are variables declared in c?

0 Answers  


What are the 5 elements of structure?

0 Answers  


What is the output from this program? #include <stdio.h> void do_something(int *thisp, int that) { int the_other; the_other = 5; that = 2 + the_other; *thisp = the_other * that; } int main(void) { int first, second; first = 1; second = 2; do_something(&second, first); printf("%4d%4d\n", first, second); return 0; }

3 Answers  






What are the 3 types of structures?

0 Answers  


#include<stdio.h> #include<conio.h> void main() { int m=0111,n=20; printf("%d%d\n",m,n); getch(); }

1 Answers  


write a c program to do the following: a) To find the area of a triangle. b) To convert the temperature from Fahrenheit to Celsius. c) To convert the time in hours : minutes : seconds to seconds.

0 Answers  


main() { int l=6; switch(l) { default:l=l+2; case 4:l=4; case 5:l++; break; } printf("%d",l); }

1 Answers  


Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?

0 Answers  


void main() { int a=1; while(a++<=1) while(a++<=2); }

4 Answers   HCL,


Can you please compare array with pointer?

0 Answers  


Categories