Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



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

Answer / bintu

-1 0 1

Is This Answer Correct ?    7 Yes 4 No

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

Answer / 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

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

Answer / kumar harsh

if i=-1
-3 -3 -1

Is This Answer Correct ?    2 Yes 1 No

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

Answer / faizvvrs14311

if i=-1
-2,-3,-2

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Code Interview Questions

how to return a multiple value from a function?

2 Answers   Wipro,


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

4 Answers   Apple, Cynity, TCS,


main() { int i =10, j = 20; clrscr(); printf("%d, %d, ", j-- , --i); printf("%d, %d ", j++ , ++i); } a. 20, 10, 20, 10 b. 20, 9, 20, 10 c. 20, 9, 19, 10 d. 19, 9, 20, 10

4 Answers   HCL,


Declare an array of N pointers to functions returning pointers to functions returning pointers to characters?

1 Answers  


C program to print magic square of order n where n > 3 and n is odd

2 Answers   Accenture,


what is the output of the below program & why ? #include<stdio.h> void main() { int a=10,b=20,c=30; printf("%d",scanf("%d%d%d",&a,&b,&c)); }

6 Answers   CSC, IIIT,


void main() { int k=ret(sizeof(float)); printf("\n here value is %d",++k); } int ret(int ret) { ret += 2.5; return(ret); }

1 Answers  


what is variable length argument list?

2 Answers  


# include <stdio.h> int one_d[]={1,2,3}; main() { int *ptr; ptr=one_d; ptr+=3; printf("%d",*ptr); }

1 Answers  


find A^B using Recursive function

2 Answers  


what is brs test reply me email me kashifabbas514@gmail.com

0 Answers  


What are the following notations of defining functions known as? i. int abc(int a,float b) { /* some code */ } ii. int abc(a,b) int a; float b; { /* some code*/ }

1 Answers  


Categories