πŸ“Š C Programming
Q. How to initialize a pointer to an array of 10 char?
  • (A) p = malloc (10);
  • (B) p = (char *) malloc(10,1);
  • (C) p = (char *) malloc (sizeof(10*char));
  • (D) p = (char *) malloc(10 * sizeof(char));
πŸ’¬ Discuss
βœ… Correct Answer: (D) p = (char *) malloc(10 * sizeof(char));

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
178
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Rudra Pratap Singh
Publisher
πŸ“ˆ
99%
Success Rate