• +91 9723535972
  • info@interviewmaterial.com

C Interview Questions and Answers

Question -  I had the definition char a[6] in one source file, and in another I declared extern char *a. Why didn't it work?

Answer - In one source file you defined an array of characters and in the other you declared a pointer to characters. The declaration extern char *a does not declare an array and therefore does not match the actual definition. The type pointer-to-type-T is not the same as array-of-type-T. Use extern char a[].

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners