Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Dynamic Array Size

Reply
Thread Tools

Dynamic Array Size

 
 
Manoj Jangid
Guest
Posts: n/a
 
      12-04-2007
Hi to all,

Is there any way to define array size dynamically in C without using
malloc or calloc ?

Kind Regards

Manoj
 
Reply With Quote
 
 
 
 
vippstar@gmail.com
Guest
Posts: n/a
 
      12-04-2007
On Dec 4, 10:14 am, Manoj Jangid <systweakma...@gmail.com> wrote:
> Hi to all,
>
> Is there any way to define array size dynamically in C without using
> malloc or calloc ?

You can also use realloc(NULL, n); or a variable length array (C99
only)
 
Reply With Quote
 
 
 
 
Martin Ambuhl
Guest
Posts: n/a
 
      12-04-2007
Manoj Jangid wrote:
> Hi to all,
>
> Is there any way to define array size dynamically in C without using
> malloc or calloc ?


realloc
 
Reply With Quote
 
Manoj Jangid
Guest
Posts: n/a
 
      12-04-2007
On Dec 4, 1:14 pm, Manoj Jangid <systweakma...@gmail.com> wrote:
> Hi to all,
>
> Is there any way to define array size dynamically in C without using
> malloc or calloc ?
>
> Kind Regards
>
> Manoj


sorry I mean without using any memory allocation

Kind Regards

Manoj Jangid
 
Reply With Quote
 
santosh
Guest
Posts: n/a
 
      12-04-2007
Manoj Jangid wrote:

> On Dec 4, 1:14 pm, Manoj Jangid <systweakma...@gmail.com> wrote:
>> Hi to all,
>>
>> Is there any way to define array size dynamically in C without using
>> malloc or calloc ?
>>
>> Kind Regards
>>
>> Manoj

>
> sorry I mean without using any memory allocation
>
> Kind Regards


How can you "allocate" something without doing any "allocation"? What
are trying to do? If you can describe the actual problem you are trying
to solve, then it may be that it is possible to solve without jumping
through hoops.

 
Reply With Quote
 
echo.sj
Guest
Posts: n/a
 
      12-05-2007
On Dec 4, 4:14 pm, Manoj Jangid <systweakma...@gmail.com> wrote:
> Hi to all,
>
> Is there any way to define array size dynamically in C without using
> malloc or calloc ?
>
> Kind Regards
>
> Manoj


C99 variable length array
 
Reply With Quote
 
Manoj Jangid
Guest
Posts: n/a
 
      12-06-2007
On Dec 5, 8:35 pm, "echo.sj" <sijie0...@gmail.com> wrote:
> On Dec 4, 4:14 pm, ManojJangid<systweakma...@gmail.com> wrote:
>
> > Hi to all,

>
> > Is there any way to define array size dynamically in C without using
> > malloc or calloc ?

>
> > Kind Regards

>
> > Manoj

>
> C99 variable length array


Thanks...
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Preferred Size, Minimum Size, Size Jason Cavett Java 5 05-25-2008 08:32 AM
mega pixels, file size, image size, and print size - Adobe Evangelists Frank ess Digital Photography 0 11-14-2006 05:08 PM
Could a struct with size 44 bytes point always points to a char array with size 2024 bytes? eagle_jyjh@citiz.net C++ 8 04-10-2006 03:05 PM
Could a struct with size 44 bytes point always points to a char array with size 2048 bytes? eagle_jyjh@citiz.net C Programming 5 04-09-2006 02:49 PM
Dynamic Size for Text Box - Expanding more than the relative size Madhanmohan S ASP .Net 5 09-03-2004 06:28 AM



Advertisments