Top

Discussion

What is the output of this program?

#include 
struct employee
{
  char *empname;
  int salary;
};
int main()
{
  struct employee e, e1;
  e.empname = "Sridhar";
  e1 = e;
  printf("%s %s", e.empname, e1.empname);
  return 0;
}

 

  • A.Garbage value Sridhar
  • B.Sridhar Garbage value
  • C.Sridhar Sridhar
  • D.Compilation Error

Answer: C

No answer description available for this question

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

Post your comment