Top

Discussion

Comment on the output of this C code?

#include 
    int const print()
    {
        printf("Sanfoundry.com");
        return 0;
    }
    void main()
    {
        print();
    }

 

  • A.Error because function name cannot be preceded by const
  • B.Sanfoundry.com
  • C.Sanfoundry.com is printed infinite times
  • D.Blank screen, no output

Answer: B

None.

Output:
$ cc pgm13.c
$ a.out

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

Post your comment