#include<stdio.h>
int main(void){
int i=5;
printf("%d %d %d %d %d\n",i++,i--,++i,--i,i);
return 0;
}
This gives me : 4 5 5 5 5
How ???
Can anyone please give me some hint as to why I am getting this ??
Thanks & regards,
Onkar 10 1875
onkar said:
#include<stdio.h>
int main(void){
int i=5;
printf("%d %d %d %d %d\n",i++,i--,++i,--i,i);
return 0;
}
This gives me : 4 5 5 5 5
How ???
Can anyone please give me some hint as to why I am getting this ??
What answer were you expecting, and why?
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
On Feb 16, 11:17 am, Richard Heathfield <r...@see.sig.invalidwrote:
onkar said:
#include<stdio.h>
int main(void){
int i=5;
printf("%d %d %d %d %d\n",i++,i--,++i,--i,i);
return 0;
}
This gives me : 4 5 5 5 5
How ???
Can anyone please give me some hint as to why I am getting this ??
What answer were you expecting, and why?
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
I was expecting 4 5 5 4 5
onkar <on*******@gmail.comwrites:
#include<stdio.h>
int main(void){
int i=5;
printf("%d %d %d %d %d\n",i++,i--,++i,--i,i);
return 0;
}
This gives me : 4 5 5 5 5
[...]
The FAQ for this newsgroup is at <http://www.c-faq.com/>.
You desperately need to read section 3. (Then read the rest of it.)
--
Keith Thompson (The_Other_Keith) <ks***@mib.org>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
onkar wrote:
#include<stdio.h>
int main(void){
int i=5;
printf("%d %d %d %d %d\n",i++,i--,++i,--i,i);
return 0;
}
What's brought all these daft UB questions out of the woodwork this week?
--
Ian Collins.
Ian Collins said:
onkar wrote:
>#include<stdio.h> int main(void){ int i=5; printf("%d %d %d %d %d\n",i++,i--,++i,--i,i); return 0; }
What's brought all these daft UB questions out of the woodwork this week?
What makes you think there's anything special about this week? :-)
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
On Sat, 16 Feb 2008 01:04:31 -0600, Ian Collins wrote
(in article <61**************@mid.individual.net>):
onkar wrote:
>#include<stdio.h> int main(void){ int i=5; printf("%d %d %d %d %d\n",i++,i--,++i,--i,i); return 0; }
What's brought all these daft UB questions out of the woodwork this week?
New semester started recently.
--
Randy Howard (2reply remove FOOBAR)
"The power of accurate observation is called cynicism by those
who have not got it." - George Bernard Shaw
Richard Heathfield <rj*@see.sig.invalidwrites:
onkar said:
>#include<stdio.h> int main(void){ int i=5; printf("%d %d %d %d %d\n",i++,i--,++i,--i,i); return 0; }
This gives me : 4 5 5 5 5
How ???
Can anyone please give me some hint as to why I am getting this ??
What answer were you expecting, and why?
it should be blatantly obvious why he doesn't think this is right. The
fact he would be wrong is besides the point.
onkar wrote:
#include<stdio.h>
int main(void){
int i=5;
printf("%d %d %d %d %d\n",i++,i--,++i,--i,i);
return 0;
}
This gives me : 4 5 5 5 5
How ???
Can anyone please give me some hint as to why I am getting this ??
Thanks & regards,
Onkar
This guy is doubtless a troll. He keeps posting such stupid questions
even after months of being told about the FAQ.
Richard wrote:
>
Richard Heathfield <rj*@see.sig.invalidwrites:
onkar said:
#include<stdio.h>
int main(void){
int i=5;
printf("%d %d %d %d %d\n",i++,i--,++i,--i,i);
return 0;
}
This gives me : 4 5 5 5 5
How ???
Can anyone please give me some hint as to why I am getting this ??
What answer were you expecting, and why?
it should be blatantly obvious why he doesn't think this is right. The
fact he would be wrong is besides the point.
But, until one starts to think about "why" he thinks the answer
should be what he thinks it should be, you cannot explain to him
the flaws in his thinking.
--
+-------------------------+--------------------+-----------------------+
| Kenneth J. Brody | www.hvcomputer.com | #include |
| kenbrody/at\spamcop.net | www.fptech.com | <std_disclaimer.h|
+-------------------------+--------------------+-----------------------+
Don't e-mail me at: <mailto:Th*************@gmail.com>
Kenneth Brody said:
Richard wrote:
>> Richard Heathfield <rj*@see.sig.invalidwrites:
onkar said:
#include<stdio.h> int main(void){ int i=5; printf("%d %d %d %d %d\n",i++,i--,++i,--i,i); return 0; }
This gives me : 4 5 5 5 5
How ???
Can anyone please give me some hint as to why I am getting this ??
What answer were you expecting, and why?
it should be blatantly obvious why he doesn't think this is right. The fact he would be wrong is besides the point.
But, until one starts to think about "why" he thinks the answer
should be what he thinks it should be, you cannot explain to him
the flaws in his thinking.
In fact, his answer to my question gave me a clue as to what he was
thinking. He might equally have said: 5 6 6 5 5, in which case my answer
would have been slightly different.
As usual, Richard Riley is sniping ignorantly, caustically, and
uncomprehendingly at people who are actually supplying help, instead of
taking the risk of supplying help himself to those who are asking for it.
He may safely be ignored, since he never contributes anything useful.
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Steve Jorgensen |
last post by:
Hi all,
I'm working on the schema for a database that must represent data about stock
& bond funds over time. My connundrum is that, for any of several dimension
fields, including the fund name...
|
by: rene |
last post by:
Hello everybody,
i have these 2 xml files
------1.xml------
<?xml version="1.0" encoding="UTF-8"?>
<root>
<element>1</element>
<element>2</element>
</root>
|
by: Jean-Gael GRICOURT |
last post by:
I am trying to use ostringstream in binary mode. Why the value (0x0A)
is automatically replaced by (0x0D,0x0A) in the output ? Is there a
workaround to this issue ?
-------- my snippet code...
|
by: joebob |
last post by:
The following script if run in Internet Explorer should
display a thumbview of a webpage that you point it to.
To test it, replace test.htm with a valid html file.
The problem I'm having is that...
|
by: Chris Capel |
last post by:
I want to do something along the lines of this:
class someclass {
static void Main() {
int i = 5;
int j = 3;
changevalue(ref i, j);
Console.WriteLine(i.ToString()); //I want this to output 3...
|
by: pruebauno |
last post by:
I am currently working on a tricky problem at work. I googled around a
bit, but "time intervals" did not come up with anything useful.
Although I have some rough idea of how I could solve it, I...
|
by: torpecool |
last post by:
Hello Everyone,
I have a situation that I just cannot wrap my head around. I would
appreciate any ideas or suggestions.
I am trying to parse and load a tab delimited file into a mysql...
|
by: nirkheys |
last post by:
Hi all,
I have been asked if the following is possible.
i googled for it,thought a lot about it and decided that it is
not possible,but i am posting it here in a hope of getting this
problem...
|
by: wraithzshadow |
last post by:
hello, I'm trying to code a form that will output all data on from one
table into separate pages (can scroll through them using the arrows, or
entering a specific entry at the bottom), but on each...
|
by: Martin Arvidsson, Visual Systems AB |
last post by:
Hi!
I have a string containing this information:
Including file: Myfile.fle (C:\Program
Files\Application\Source\Myfile.fle)
After myfile.fle there are three spaces!
Since i use the...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |