G
guthena
Write a small C program to determine whether a machine's type is
little-endian or big-endian.
little-endian or big-endian.
Write a small C program to determine whether a machine's type is
little-endian or big-endian.
Write a small C program to determine whether a machine's type is
little-endian or big-endian.
Write a small C program to determine whether a machine's type is
little-endian or big-endian.
Write a small C program to determine whether a machine's type is
little-endian or big-endian.
Write a small C program to determine whether a machine's type is
little-endian or big-endian.
guthena said:Write a small C program to determine whether a machine's type is
little-endian or big-endian.
guthena said:Write a small C program to determine whether a machine's type is
little-endian or big-endian.
Write a small C program to determine whether a machine's type is
little-endian or big-endian.
guthena said:Write a small C program to determine whether a machine's type is
little-endian or big-endian.
Write a small C program to determine whether a machine's type is
little-endian or big-endian.
guthena said:Write a small C program to determine whether a machine's type is
little-endian or big-endian.
To save time please put Guthena's name at the top and email it directChris Dollin said:OK, I've done that.
Write a small C program to determine whether a machine's type is
little-endian or big-endian.
Chris said:To save time please put Guthena's name at the top and email it direct
to his lecturer.
Further to save time can I email my homework direct to you in the
future?
Chris (The other one)
Tejas Kokje said:Here you go..
int main()
{
int num=1;
char *cptr;
cptr = (char *)#
if (*cptr)
printf ("little endian\n");
else
printf ("big endian\n");
return 0;
}
Which company interview question is this ? :-D
Chris Dollin said:You missed my signature, yes?
No problem.
I thought you were the /other/ other one. /The/ Chris, of course, being
Chris Torek.
Congratulations. You just did his homework for him. Since it's a crappy
assignment,
his teacher probably thinks he did a sterling job, he'll
probably pass the course on the back of your work, and he'll end up
holding a job as a programmer _still_ thinking that this is a good
program. Which it is not; it is flawed for several reasons.
Can you tell me how it is flawed? Is it because of casting from int*
to char* ?
Chris said:Who?
You're /surely/ not serious.
Why?
You're /surely/ not serious.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.