By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,995 Members | 1,241 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,995 IT Pros & Developers. It's quick & easy.

can u help me , what the output will be

P: n/a
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 ,

Jan 23 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
* 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?
Jan 23 '07 #2

P: n/a
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.
Shouldn't that read

Don't multi-post.

Cross-post.

--
Ian Collins.
Jan 23 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.