# can u help me , what the output will be

Discussion in 'C++' started by yogesh, Jan 23, 2007.

1. ### yogeshGuest

char TCGI::x2c(char *what)
{
register char digit;
digit = (char) ((what[0] >= 'A' ? ((what[0] & 0xdf) - 'A')+10 :
(what[0] - '0')));
digit *= (char) 16;
digit += (char) ((what[1] >= 'A' ? ((what[1] & 0xdf) - 'A')+10 :
(what[1] - '0')));
return(digit);
}

what the operation is used for , what it will return the value ,

yogesh, Jan 23, 2007

2. ### Alf P. SteinbachGuest

* yogesh:
> char TCGI::x2c(char *what)
> {
> register char digit;
> digit = (char) ((what[0] >= 'A' ? ((what[0] & 0xdf) - 'A')+10 :
> (what[0] - '0')));
> digit *= (char) 16;
> digit += (char) ((what[1] >= 'A' ? ((what[1] & 0xdf) - 'A')+10 :
> (what[1] - '0')));
> return(digit);
> }
>
>
> what the operation is used for , what it will return the value ,

You have posted the same article /separately/ to alt.comp.lang.learn.c-c++.

Don't.

Multi-post.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?

Alf P. Steinbach, Jan 23, 2007

3. ### Ian CollinsGuest

Alf P. Steinbach wrote:
> * yogesh:
>
>> char TCGI::x2c(char *what)
>> {
>> register char digit;
>> digit = (char) ((what[0] >= 'A' ? ((what[0] & 0xdf) - 'A')+10 :
>> (what[0] - '0')));
>> digit *= (char) 16;
>> digit += (char) ((what[1] >= 'A' ? ((what[1] & 0xdf) - 'A')+10 :
>> (what[1] - '0')));
>> return(digit);
>> }
>>
>>
>> what the operation is used for , what it will return the value ,

>
>
> You have posted the same article /separately/ to alt.comp.lang.learn.c-c++.
>
> Don't.
>
> Multi-post.
>

Don't multi-post.

Cross-post.

--
Ian Collins.

Ian Collins, Jan 23, 2007