This is a discussion on What happens when declared this way within the C and C++ forums, part of the Programming Talk category; Is it possible to declare variable inside the for loop like for (int a = 0; a<5;a++) { ...... ...... } I ...
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Is it possible to declare variable inside the for loop like
for (int a = 0; a<5;a++) { ...... ...... } I want to know whether the above declaration of variables is possible in all types of C compilers. |
|
|||
|
I don't know about all compilers but all the ones that I have worked with did support this functionality.
|
![]() |
| Thread Tools | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) | Steve Summit | Tech FAQ | 0 | 06-15-2004 07:00 AM |
| comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) | Steve Summit | Tech FAQ | 0 | 06-01-2004 07:01 AM |
| comp.lang.c Answers to Frequently Asked Questions (FAQ List) | Steve Summit | Tech FAQ | 0 | 06-01-2004 07:00 AM |
| comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) | Steve Summit | Tech FAQ | 0 | 05-15-2004 07:00 AM |