What is the memory allocated by the following definition ?
int (*x)();
Answers were Sorted based on User's Feedback
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 |
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 |
Differentiate between ordinary variable and pointer in c.
A SIMPLE PROGRAM OF GRAPHICS AND THEIR OUTPUT I WANT SEE WAHAT OUTOUT OF GRAPHICS PROGRAM
How are variables declared in c?
What are the 5 elements of structure?
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; }
What are the 3 types of structures?
#include<stdio.h> #include<conio.h> void main() { int m=0111,n=20; printf("%d%d\n",m,n); getch(); }
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.
main() { int l=6; switch(l) { default:l=l+2; case 4:l=4; case 5:l++; break; } printf("%d",l); }
Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?
void main() { int a=1; while(a++<=1) while(a++<=2); }
Can you please compare array with pointer?