CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Main CFD Forum (
-   -   Programming C, Basic (

george August 27, 2006 06:50

Programming C, Basic
1)How can someone achieve dynamic memory allocation in Basic? 2)How can someone pass as arguments multidimensional arrays in subroutines in Basic and C?

Mani August 28, 2006 08:01

Re: Programming C, Basic
I don't remember much about Basic. I am actually surprised it's still in use.

As for C: Pointers are preferable to the (bracket) arrays. In that way, an array is defined by the pointer to its first element and its size. Those can be passed to functions (subroutines). Check out "The C programming language" by the C creators Kernighan and Ritchie.

(and also consider posting questions like this on a programming forum)

Amol Korde September 3, 2006 21:08

Re: Programming C, Basic
Dear sir,

I am writing program in C for one dimensional unsteady comoressible flow. I am writing it with the help of Patankar's book on Numerical heat transfer & fluid flow. I need guidance for obtaining convergence & providing boundary conditions. Can you provide me the similar type of a program from which I can obtain some guidance? Can you recommend me some book regarding the same, that is available free online, so that I can download it?

Waiting for your reply.

Best Regards Amol Korde

Amol Korde September 12, 2006 22:42

Re: Programming C, Basic
Dear sir,

I am facing difficulties in applying the boundary conditions while writing C program on one dimensional unsteady compressible flow.Please guide me about the same. Is there a similar program available on line so that I can refer it?

Reply soon.

Best Regards Amol Korde

All times are GMT -4. The time now is 18:26.