[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

C Programming :: Dynamic Memory Allocation - Discussion

Home > C Programming > Dynamic Memory Allocation > MCQs Questions Discussion

17 / 18

What will be output of the following "c" code?

FUNC (int *p)
 {
  p = (int *)malloc(100);
  printf("p:%x",p);
 }

 int main( )
 {
  int *ptr;
  FUNC(ptr);
  printf("Ptr:%x",ptr);
  return 0;
 }

ABoth printf statements prints same values

BBoth print different values

CGives compile time error

DGives run time error

Answer: Option (Login/Signup)

Show Explanation

Asked In :: Global Edge Sopra Steria

Post Your Answer Here:     

No Discussion on this question yet!