Which of the following declaration is illegal?
A. char *str = “Best C programming classes by Sanfoundry”;
B. char str[] = “Best C programming classes by Sanfoundry”;
C. char str[20] = “Best C programming classes by Sanfoundry”;
D. char[] str = “Best C programming classes by Sanfoundry”;
Answer:A
Which of the following declaration is illegal?
A. char *str = “Best C programming classes by Sanfoundry”; B. char str[] = “Best C programming classes by Sanfoundry”; C. char str[20] = “Best C programming classes by Sanfoundry”; D. char[] str = “Best C programming classes by Sanfoundry”;
Explanation:char[] str is a declaration in Java, not in C.