I have the following code
1.If i put 2 the programm is terminated. Shouldn't it just output the value of a (2)? That happened on C++ I think.Code:printf("Start. Give a\n"); scanf("%d",&a); printf("\na is %d\n",a); if (a==2) { return a; printf("a is 2\n"); } return 0;
2.And In my book I've red that with return you can restore the cotrol from a function to the main() function. This means that it works like "break;"
------------------------------------------------------------------------------------------------
My learning process on my blog



LinkBack URL
About LinkBacks



