Is there any difference between the two declarations,

1. int foo(int *arr[]) and

2. int foo(int *arr[2])



Is there any difference between the two declarations, 1. int foo(int *arr[]) and 2. int foo(i..

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

Post New Answer

More C Code Interview Questions

write a c-program to find gcd using recursive functions

5 Answers   HTC, Infotech,


which function is used to clear the buffer stream on gcc? for example: I wrote following code on gcc #include<stdio.h> int main(void) { char ch; int a,b; printf("\nenter two numbers:\t"); scanf("%d%d",&a,&b); printf("enter number is %d and %d",a,b); printf("\nentercharacter:\t"); scanf("%c",&ch); printf("enter character is %c",ch); return 0; } in above progarm ch could not be scan. why?plz tell me solution.

2 Answers  


main() { printf("\nab"); printf("\bsi"); printf("\rha"); }

3 Answers  


main() { float me = 1.1; double you = 1.1; if(me==you) printf("I love U"); else printf("I hate U"); }

1 Answers  


Write a routine that prints out a 2-D array in spiral order

3 Answers   Microsoft,






1. const char *a; 2. char* const a; 3. char const *a; -Differentiate the above declarations.

3 Answers  


Write a program to receive an integer and find its octal equivalent?

7 Answers  


main() { int *j; { int i=10; j=&i; } printf("%d",*j); }

9 Answers   HCL, Wipro,


abcdedcba abc cba ab ba a a

2 Answers  


main() { int i=5,j=6,z; printf("%d",i+++j); }

2 Answers  


main() { int i=5,j=10; i=i&=j&&10; printf("%d %d",i,j); }

1 Answers  


Find the largest number in a binary tree

7 Answers   Infosys,


Categories