275 views
1 votes
1 votes
#include<stdio.h>
#include<stdio.h>
void main()
{
int in;
while ((in = getchar()))
{
putchar(in);
}
}

 

 

explain o/p and what is in=getchar line

2 Answers

0 votes
0 votes
It will accept a character from keyboard.

Display the character.

This loop will continue infinitley.!!!!

reason: For each read of character from keyboard, get char() returns a non zero value

hence while loop runs forever

Related questions

0 votes
0 votes
1 answer
1
0 votes
0 votes
1 answer
2