why is printf("%d %d %d",i++,--i,i--);

Answer Posted / rick g

if: i = (-1)

-1, -1, -1

(1) Print '-1', then post-increment i. i is now 0.
(2) Pre-decrement i. i is now back to -1. Print '-1'
(3) Print '-1', then post-decrement i. i is now -2

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to programme using switch statements and fuctions, a programme that will output two even numbers, two odd numbers and two prime numbers of the users chioce.

2130


Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange

2849


What is full form of PEPSI

1848


how to create a 3x3 two dimensional array that will give you the sums on the left and bottom columns

3112


can you use proc sql to manpulate a data set or would u prefer to use proc report ? if so why ? make up an example and explain in detail

2313






create a C-code that will display the total fare of a passenger of a taxi if the driver press enter,the timer will stop. Every 10 counts is 2 pesos. Initial value is 25.00

6295


Cluster head selection in Wireless Sensor Network using C programming language.

3092


Can you send Code for Run Length Encoding Of BMP Image in C Language in linux(i.e Compression and Decompression) ?

3835


why do you use macros? Explain a situation where you had to incorporate macros in your proc report? use a simple instream data example with code ?

2248


write a simple calculator c program to perform addition, subtraction, mul and div.

3126


What is the difference between proc means and proc tabulate ? explain with a simple example when you have to use means or tabulate?

3697


What is data _null_? ,Explain with code when u need to use it in data step programming ?

2806


Write a program to model an exploding firecracker in the xy plane using a particle system

3676


How do you verify if the two sentences/phrases input is an anagram using predefined functions in string.h and by using arrays?

2006


write a program for area of circumference of shapes

2022