Top

Discussion

What will be the output of the program If characters 'a', 'b' and 'c' enter are supplied as input?

#include

int main()
{
    void fun();
    fun();
    printf("\n");
    return 0;
}
void fun()
{
    char c;
    if((c = getchar())!= '\n')
        fun();
    printf("%c", c);
}

 

  • A.abc abc
  • B.bca
  • C.Infinite loop
  • D.cba

Answer: D

No answer description available for this question.

No comment is present. Be the first to comment.
Loading…

Post your comment