Monday, 18 April 2011

nice concept behind this

what will be the output of this program?
#include<stdio.h>
int main()
{
int x=011,i;
for(i=0;i<x;i+=3)
{
printf("start");
continue;
printf("end");
}
return 0;
}

output:-start start start 

Explanation:-
011 is octal number. Its equivalent decimal value is 9.
So, x = 9



2 comments: