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 |
source code for delete data in array for c
writte a c-programm to display smill paces
main() { int i; float *pf; pf = (float *)&i; *pf = 100.00; printf("\n %d", i); } a. Runtime error. b. 100 c. Some Integer not 100 d. None of the above
main() { if (!(1&&0)) { printf("OK I am done."); } else { printf("OK I am gone."); } } a. OK I am done b. OK I am gone c. compile error d. none of the above
respected sir, i did my MCA in 2013 when i am going to attend to an interview i was asked about my project how will i explain my project could please help me in this and my project title is "Social Networking Site For Social Responsibility"
void main() { static int i=i++, j=j++, k=k++; printf(“i = %d j = %d k = %d”, i, j, k); }
Is this code legal? int *ptr; ptr = (int *) 0x400;
main() { if ((1||0) && (0||1)) { printf("OK I am done."); } else { printf("OK I am gone."); } } a. OK I am done b. OK I am gone c. compile error d. none of the above
create a C-code that will display the total fare of a passenger of a taxi if the driver press enter,the timer will stop. Every 10 counts is 2 pesos. Initial value is 25.00
/*what is the output for*/ void main() { int r; printf("Naveen"); r=printf(); getch(); }
plz send me all data structure related programs
#define a 10 int main() { printf("%d..",a); foo(); printf("%d..",a); return 0; } void foo() { #undef a #define a 50 }