
- Forum
- Programming Talk
- C and C++
- c programming
c programming
This is a discussion on c programming within the C and C++ forums, part of the Programming Talk category; main() { int c=--2; printf("c=%d",c); } y there is an compiler error...
-
08-25-2011, 08:58 AM #1
- Join Date
- Aug 2011
- Answers
- 1
c programming
main()
{
int c=--2;
printf("c=%d",c);
}
y there is an compiler error
-
int c=--2;
It should be c=(-2)
-
09-27-2011, 01:08 AM #3
- Join Date
- Sep 2011
- Location
- INDIA
- Answers
- 10
why had u given as '--2', give it as -2,and once check it
-
02-23-2012, 07:24 AM #4
- Join Date
- Feb 2012
- Answers
- 66
I think it should be given as
int c;
c=--2;
printf("%c=%d",c)
-- is the decrement operator
-
Sponsored Ads

Reply With Quote





