#include<stdio.h>
int main()
{
int i=2,j=3;
j= - - i--;
printf("%d%d",i,j);
return 0;
}

Somebody please explain the working of this program

Recommended Answers

All 4 Replies

That's a pretty evil looking expression. Here's a hint: the two trailing -'s combine to form a postfix decrement operator while the two leading -'s are separate unary operators.

Do you know what the negative of a negative number is?

Do you know what the negative of a negative number is?

Big hint.

I figured this program's working guys.. anyways thank you..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.