Re: c question
- From: rlb@xxxxxxxxxxxxxxxxxxxxxx (Richard Bos)
- Date: Tue, 05 Sep 2006 12:24:12 GMT
=?ISO-8859-1?Q?=22Nils_O=2E_Sel=E5sdal=22?= <NOS@xxxxxxx> wrote:
Richard Bos wrote:
"shaanxxx" <shaanxxx@xxxxxxxxx> wrote:
girish.dinne@xxxxxxxxx wrote:
what value will be assigned for the following statement."Hai" will return an address which will coverted to int and assigned to
int i="hai";
i.
Please quote C&V in the Standard where this is guaranteed.
perhaps 6.3.2.3:6 in C99.
That only allows pointers to be converted to integers; it does not say
that the conversion occurs automatically, without a cast.
The result is implementation defined or undefined behaviour though.
Quite; so the result may not ever be assigned to i. UB means that it is
also allowed to simply crash.
Richard
.
- References:
- c question
- From: girish . dinne
- Re: c question
- From: shaanxxx
- Re: c question
- From: Richard Bos
- Re: c question
- From: "Nils O. Selåsdal"
- c question
- Prev by Date: Re: Why GCC does warn me when I using gets() function for accessing file
- Next by Date: Re: struct question: NULL terminated char* array
- Previous by thread: Re: c question
- Next by thread: Re: c question
- Index(es):
Relevant Pages
|