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);
}
#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);
}
Comments
Leave a comment