At first I want to say, that I'm a beginner and I'm just curious, why is the result in the output doubled and due what it's so.
And this is the output:Code:#include <stdio.h> int main(void) { char ch; do { printf("Enter char: \n"); ch = getchar(); if(ch == 'q') break; printf("Hello World ! \n"); } while(ch!='q'); }
Code:Enter char: a Hello World ! Enter char: Hello World ! Enter char: