How to know the size of array
- From: "manochavishal@xxxxxxxxx" <manochavishal@xxxxxxxxx>
- Date: 23 Mar 2006 02:06:31 -0800
Hi,
I have a question.
How can i know the size of array when it is passed to a function.
For Example i have this code:
#include <stdio.h>
#include <stdlib.h>
void foo(int * array);
int main(void)
{
int n=5;
int array[n];
foo(array);
}
void foo(int * array)
{
/*Here how can i know the size of array without passing it explicitly*/
}
Thanx in advance
Vishal
.
- Follow-Ups:
- Re: How to know the size of array
- From: zhousqy
- Re: How to know the size of array
- From: Keith Thompson
- Re: How to know the size of array
- From: pemo
- Re: How to know the size of array
- From: Vladimir S. Oka
- Re: How to know the size of array
- Prev by Date: Re: reversing a byte
- Next by Date: Re: syntax: struct in a struct
- Previous by thread: problem with strcat function
- Next by thread: Re: How to know the size of array
- Index(es):