Top

Discussion

Point out the error, if any in the while loop.

#include
int main()
{
    void fun();
    int i = 1;
    while(i <= 5)
    {
        printf("%d\n", i);
        if(i>2)
            goto here;
    }
return 0;
}
void fun()
{
    here:
    printf("It works");
}

 

  • A.No Error: prints "It works"
  • B.Error: fun() cannot be accessed
  • C.Error: goto cannot takeover control to other function
  • D.No error

Answer: C

No answer description available for this question.
 

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

Post your comment