While Loop Tricks :D

code:

#include<stdio.h>
int main()
{
    int i=1;
    while(i<=printf("Hi\n")){
        printf("Hello\n");
        i++;
    }
    printf("%d\n",i);

    return 0;
}

output:

Hi
Hello
Hi
Hello
Hi
Hello
Hi
4

Process returned 0 (0x0)   execution time : 3.348 s
Press any key to continue.


 

It would be a great help, if you support by sharing :)
Author: zakilive

Leave a Reply

Your email address will not be published. Required fields are marked *