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 |
write a c-program to find gcd using recursive functions
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.
main() { printf("\nab"); printf("\bsi"); printf("\rha"); }
main() { float me = 1.1; double you = 1.1; if(me==you) printf("I love U"); else printf("I hate U"); }
Write a routine that prints out a 2-D array in spiral order
1. const char *a; 2. char* const a; 3. char const *a; -Differentiate the above declarations.
Write a program to receive an integer and find its octal equivalent?
main() { int *j; { int i=10; j=&i; } printf("%d",*j); }
abcdedcba abc cba ab ba a a
main() { int i=5,j=6,z; printf("%d",i+++j); }
main() { int i=5,j=10; i=i&=j&&10; printf("%d %d",i,j); }
Find the largest number in a binary tree