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 |
Design an implement of the inputs functions for event mode
void main() { char a[]="12345\0"; int i=strlen(a); printf("here in 3 %d\n",++i); }
void main() { int c; c=printf("Hello world"); printf("\n%d",c); }
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"
#define a 10 void foo() { #undef a #define a 50 } int main() { printf("%d..",a); foo(); printf("%d..",a); return 0; } explain the answer
#include"math.h" void main() { printf("Hi everybody"); } if <stdio.h> will be included then this program will must compile, but as we know that when we include a header file in "" then any system defined function find its defination from all the directrives. So is this code of segment will compile? If no then why?
Cluster head selection in Wireless Sensor Network using C programming language.
typedef struct error{int warning, error, exception;}error; main() { error g1; g1.error =1; printf("%d",g1.error); }
main(){ unsigned int i; for(i=1;i>-2;i--) printf("c aptitude"); }
String reverse with time complexity of n/2 with out using temporary variable.
what is oop?
1 o 1 1 0 1 0 1 0 1 1 0 1 0 1 how to design this function format in c-language ?