int DIM(int array[])
{
return sizeof(array)/sizeof(int );
}
main()
{
int arr[10];
printf(“The dimension of the array is %d”, DIM(arr));
}
Answers were Sorted based on User's Feedback
Answer / susie
Answer :
1
Explanation:
Arrays cannot be passed to functions as arguments and only
the pointers can be passed. So the argument is equivalent to
int * array (this is one of the very few places where [] and
* usage are equivalent). The return statement becomes,
sizeof(int *)/ sizeof(int) that happens to be equal in this
case.
| Is This Answer Correct ? | 9 Yes | 2 No |
Answer / manoj kumar
Arrays cannot be passed to functions as arguments and only
the pointers can be passed.
| Is This Answer Correct ? | 3 Yes | 0 No |
main() { int i=5; printf("%d%d%d%d%d%d",i++,i--,++i,--i,i); }
void main() { char far *farther,*farthest; printf("%d..%d",sizeof(farther),sizeof(farthest)); }
why is printf("%d %d %d",i++,--i,i--);
How do you create a really large matrix (i.e. 3500x3500) in C without having the program crash? I can only reach up to 2500. It must have something to do with lack of memory. Please help!
why java is platform independent?
#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }
can u give me the c codings for converting a string into the hexa decimal form......
WAP to display 1,2,3,4,5........N
main(){ int a= 0;int b = 20;char x =1;char y =10; if(a,b,x,y) printf("hello"); }
Given n nodes. Find the number of different structural binary trees that can be formed using the nodes.
16 Answers Aricent, Cisco, Directi, Qualcomm,
#define FALSE -1 #define TRUE 1 #define NULL 0 main() { if(NULL) puts("NULL"); else if(FALSE) puts("TRUE"); else puts("FALSE"); }
write a program to find out roots of quadratic equation "x=-b+-(b^2-4ac0^-1/2/2a"