Top

Discussion

The following program

main()
{
  static char a[3][4] = {"abcd", "mnop", "fghi"};
  putchar(**a);
}

 

  • A.will not compile successfully
  • B.results in run-time error
  • C.prints garbage
  • D.none of the above

Answer: D

*a points to the string "abcd".**a is the first character of "abcd", which is the character 'a '

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

Post your comment