Wednesday, February 24, 2010

30

#include< stdio.h >
int main()
{
int a;
printf("enter no.");
scanf("%d",&a)+1;
a=printf("%d",a++)+a;
printf("%d",a);
return 0;
}


Output:


enter no.
2


2
4

Note: This program will show one warning i.e.,"Code Has no effect" (scanf("%d",&a)+1; this line does nothing).

0 comments:

Post a Comment