[c-prog] C objective...

2007-02-06 Thread ranjan kumar ojha
int main() { int i=4; if(i=5) { printf( Hi Ranjan ); } return 0; } Its answer is Hi Ranjan can anyone explain it - The all-new Yahoo! Mail goes wherever you go - free your email

Re: [c-prog] C objective...

2007-02-06 Thread Brett W. McCoy
On 2/6/07, ranjan kumar ojha [EMAIL PROTECTED] wrote: int main() { int i=4; if(i=5) { printf( Hi Ranjan ); } return 0; } Its answer is Hi Ranjan can anyone explain it Because the statement if(i=5) is always true. If you instead made if(i==5), it

Re: [c-prog] C objective...

2007-02-06 Thread Tamas Marki
On 2/6/07, ranjan kumar ojha [EMAIL PROTECTED] wrote: int main() { int i=4; if(i=5) { printf( Hi Ranjan ); } return 0; } Its answer is Hi Ranjan can anyone explain it = is the assignment operator. If you want to check equality

[c-prog] C++

2007-02-06 Thread kk_prajakta
Hi .. Can you suggest any online books for C++ interfacing?

[c-prog] answer 4 ur question.....

2007-02-06 Thread Deepak Shankar
No chance both the printf will print '6' only. [mod - I think you'll find that the OP was assuming one of the printf() would be executed - not both in order which is what you're assuming - PJH] -Original Message- From: [EMAIL

RE: [c-prog] C objective...

2007-02-06 Thread prem.krishna
You can also use if(i!=5) From: c-prog@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Paul Crate Sent: Tuesday, February 06, 2007 5:49 PM To: c-prog@yahoogroups.com Subject: RE: [c-prog] C objective... you are entering the if statement because you

Re: [c-prog] xml in C

2007-02-06 Thread Brett W. McCoy
On 2/6/07, shantibhushan sale [EMAIL PROTECTED] wrote: Does anyone know how to use XML data inside C program? I want to develop a prgm that will access XML( database) in C program. There are lots of XML libraries available for C. Expat is one: http://expat.sourceforge.net/ -- Brett

Re: [c-prog] Win32 locale

2007-02-06 Thread Pedro Izecksohn
--- Thomas Hruska [EMAIL PROTECTED] wrote: I think you are looking for LCIDs. The answer is Yes on both a user-level and system-level basis. http://www.microsoft.com/globaldev/reference/lcid-all.mspx http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/nls_08tg.asp

Re: [c-prog] what is a vector ?

2007-02-06 Thread Victor A. Wagner Jr.
At 15:08 2007-02-05, Robert Ryan wrote: the out it gives is - the total is: -20, but I don't see how on Visual C++ Huh? don't see how what on Visual C++ and what did you initialize the array with?? Victor A. Wagner Jr. [EMAIL PROTECTED] wrote: At 18:21 2007-02-04, Robert Ryan wrote: ok,

Re: [c-prog] Re: time calculator code

2007-02-06 Thread Victor A. Wagner Jr.
At 13:47 2007-02-05, mohammed_isam1984 wrote: i think it has something to do with the intra-processor representation of floating point numbers, maybe the intermediate results are rounded or truncated. BUT for sure, if you replace this line: float x,y,z1,z2,i,j; WITH THIS: double

Re: [c-prog] what is a vector ?

2007-02-06 Thread Victor A. Wagner Jr.
At 23:45 2007-02-05, Robert Ryan wrote: I will go over that code again. i can't see any reason that it should give an answer like -20. that answer must have come from something else... do you see the comment: /* some code to put stuff in array_one */ well, PUT SOMETHING IN array_one

[c-prog] C++ objective....

2007-02-06 Thread ranjan kumar ojha
#includeiostream using namespace std; int main() { cout( 123 - 0123 ); return 0; } guess what would be answer . plz give proper explanation of above question. - What kind of emailer are you? Find out today - get

Re: [c-prog] C++ objective....

2007-02-06 Thread Paul Herring
On 2/6/07, ranjan kumar ojha [EMAIL PROTECTED] wrote: #includeiostream using namespace std; int main() { cout( 123 - 0123 ); return 0; } guess what would be answer . Why guess.? 123 - 83 = 40. plz give proper explanation of above question. 0123 is 83 expressed in octal. --