Wednesday, October 21, 2009

How to find sum of two variables without using an operator?

#include<stdio.h>
void main()
{
int a=3,b=2,c;
c=printf("%*d%*d",a,1,b,1);
clrscr();
printf("%d",c);
getch();
}

To understand more about this printf, Click here

1 comment:

  1. * Causes printf to pad the output until it is n characters wide, where n is an integer value stored in the a function argument just preceding that represented by the modified type. For example printf("%*d", 5, 10) will result in "10" being printed with a width of 5.

    ReplyDelete

Thanks for commenting in my blog...