Explain following declaration
int *P(void);
and
int (*p)(char *a);
Answers were Sorted based on User's Feedback
Answer / vijay
int* p(void) means p is a function that takes no argument a
return a pointer to integer.
int (*p)(char*a) means that p is a pointer to function that
take character pointer as argument and return an integer.
| Is This Answer Correct ? | 56 Yes | 4 No |
Answer / binod adhikari
int *p(void)
Here p is a pointer function with no arguments. int *p means p is a pointer function which has to return an memory address of integer type to the called function (i.e. where the pointer function p has been called). (void) means function p does not have any argument.
int *p(char *a);
Here p is a pointer function with one pointer arguments of character type. The called function (i.e. where the pointer function p has been called) pass the memory address of the character variable to pointer function p since it has char *a argument. p is a pointer function so, it has to return an memory address of integer type to the called function.
| Is This Answer Correct ? | 9 Yes | 1 No |
Answer / tibu
int *p(void) - says this is function with null parameter
and returns a pointer to an integer.
int (*p)(char *a) - says this is function with a pointer to
a char a as parameter and returns a pointer to an integer.
| Is This Answer Correct ? | 19 Yes | 19 No |
what is data structure?
If jack lies on Mon, Tue Wed and jill lies on Thursday, Friday and Saturday. If both together tell they lied yesterday. So c the given options and then c cos in the given dates one will be saying the truth and one will be lying. I got Thursday as option because jack is saying the truth he lied yest but jill is lying again as he lies on that day.
Write a C program to get the desired output. 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 . . . 1 n..............n 1 Note: n is a positive integer entered by the user.
how to find out the inorder successor of a node in a tree??
main() {char a[10]={1,2,3,4,5,6};int x; for(x=0;x<4;x++){ b[x]=x+'a';} printf("%s",b);}
hi send me sample aptitude papers of cts?
character array A[12] can hold
why should i select you?
In which language linux is written?
What is the difference between array_name and &array_name?
WRITE A PROGRAM IN C TO MULTIPLY TWO 2-D ARRAYS
Is array a primitive data type in c?