Answer to Question #293737 in Engineering for Jagruti

Question #293737

What will be the output of following program? Justify your answer.



#include<stdio.h>



void main()



{



int k=8,b;



b=(k++-k++-k++-k++);



printf(“\n b=%d”,b);



}

1
Expert's answer
2022-02-06T11:35:03-0500
#include<stdio.h>


void main(){
	int k=8,b;
	b=(k++-k++-k++-k++);
	//k++ <=> k=k+1
	//display the result
	printf("\n b=%d",b);


	scanf("%d",&k);
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS