Re: [c-prog] Re: ISO/IEC 9899:1999 stdbool.h true

2007-05-29 Thread Pedro Izecksohn
if (i==b) If you're suggesting this should be an error, then should the following be an error also? struct { unsigned flag1 : 1; unsigned flag2 : 1; } x; if (x.flag1 == true) If I would write the C standard, or I would make restrictions to use true or I would not declare

[c-prog] variable's scope

2007-05-29 Thread sanjib kumar ghorui
Hi, How do we print the static 'a' within the scope(where the printf is called,) #includestdio.h #includestdlib.h int a=1; void fun(void) { static int a=2; { int a =3; printf(%d %d ,a, ::a); // here we have to print the static a } } void main() {

Re: [c-prog] variable's scope

2007-05-29 Thread Paul Herring
On 5/29/07, sanjib kumar ghorui [EMAIL PROTECTED] wrote: Hi, How do we print the static 'a' within the scope(where the printf is called,) You can't in C. The opening brace of the inner block and the subsequent declaration of a new a hides the previous version. The same applies to

[c-prog] Help

2007-05-29 Thread overlookdove
Hi all I m lolking help to learn C could u pl. help me Thanks in Advance