1. Using iteration or conditional statement.
2.Recursive functuion-function calls itself.
So,if iteration or conditional statement are not used, then recursive is another go...using recursive function we can write main() function as follows.
main()
{
printf("Hello world\n");
main();
}
{
printf("Hello world\n");
main();
}
Output:
Hello world is printed infinte number of times, till u break the program.
No comments:
Post a Comment