Is there any difference between the two declarations,
1. int foo(int *arr[]) and
2. int foo(int *arr[2])
Answer / susie
Answer :
No
Explanation:
Functions can only pass pointers and not arrays. The numbers
that are allowed inside the [] is just for more readability.
So there is no difference between the two declarations.
| Is This Answer Correct ? | 1 Yes | 6 No |
#define FALSE -1 #define TRUE 1 #define NULL 0 main() { if(NULL) puts("NULL"); else if(FALSE) puts("TRUE"); else puts("FALSE"); }
Is there any difference between the two declarations, 1. int foo(int *arr[]) and 2. int foo(int *arr[2])
There is a lucky draw held every day. if there is a winning number eg 1876,then all possible numbers like 1867,1687,1768 etc are the numbers that match irrespective of the position of the digit. Thus all these numbers qualify fr the lucky draw prize Assume there is no zero digit in any numbers. write a program to show all the possible winning numbers if a "winning number"is passed as an arguments to the function.
main() { int c[ ]={2.8,3.4,4,6.7,5}; int j,*p=c,*q=c; for(j=0;j<5;j++) { printf(" %d ",*c); ++q; } for(j=0;j<5;j++){ printf(" %d ",*p); ++p; } }
Under linux environment can u please provide a c code for computing sum of series 1-2+3-4+5......n terms and -1+2-3+4-5...n terms..
1) int i=5; j=i++ + i++ + i++; printf("%d",j);This code gives the answer 15.But if we replace the value of the j then anser is different?why? 2)int i=5; printf("%d",i++ + i++ + i++); this givs 18.
char *someFun() { char *temp = “string constant"; return temp; } int main() { puts(someFun()); }
Is the following code legal? typedef struct a aType; struct a { int x; aType *b; };
Extend the sutherland-hodgman clipping algorithm to clip three-dimensional planes against a regular paralleiepiped
Finding a number which was log of base 2
write a simple calculator c program to perform addition, subtraction, mul and div.
1 Answers United Healthcare, Virtusa,
There are 21 people in a room. They have to form groups of 3 people each. How many combinations are possible? Write a C program to print the same.