← All topics
Quiz: C Arrays and Strings: questions with answers
10 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. What does this print? (code)
- Q2. What are the values of int a[5] = {1, 2};?
- Q3. How should you check if two C strings are equal?
- Q4. What does this print? (code)
- Q5. Why is strcpy dangerous?
- Q6. What does this print? (code)
- Q7. What does this print? (code)
- Q8. What does this print? (code)
- Q9. For int a[10];, what is the index of the last element?
- Q10. Why does scanf("%s", name) read only "Asha" when the user types "Asha Rao"?