I was wondering why the following code returns the smallest integer?
int x;
for(x=1; x>0; x<<=1);
printf("%d",x);
thanks.
Type: Posts; User: jedi_jinn
I was wondering why the following code returns the smallest integer?
int x;
for(x=1; x>0; x<<=1);
printf("%d",x);
thanks.
Do you know where I can find information on format descriptors like %d, %g, %e, %f?
#include <stdio.h>
#include <math.h>
int main()
{
int base, exp;
scanf("%d", &base) ;
scanf("%d", &exp) ;
printf("%d ^ %d = %d\n", base, exp, pow(base,exp)) ; ...