Hi Saifi,

There is no difference except one is using ascii character in hex notation and 
second is using hex notation.

I am still thinking, how use of one or other can make a difference!

Anup.




________________________________
From: Saifi Khan <[email protected]>
To: [email protected]
Sent: Thursday, 9 April, 2009 6:51:18 PM
Subject: [twincling] two C programs





Hi all:

What is the difference between the following two C programs ?

--

#include <stdio.h>

int main(int argc, char *argv[])
{
unsigned char uc[] = "\xFF";

return 0;
}

--

#include <stdio.h>

int main(int argc, char *argv[])
{
unsigned char uc[2] = { (unsigned char)(char) 0xFF, 0 };

return 0;
}

All observations and insights are very welcome.

thanks
Saifi.

Reply via email to