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
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
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
Hi .. Can you suggest any online books for C++ interfacing?
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
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
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
--- 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
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,
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
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
#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
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.
--
13 matches
Mail list logo