C Arrays & Pointers: 22 MCQs
All 22 multiple-choice questions from this kit, free and with no sign-up.
Warm-up · 4 questions
Q1. What is a 1D array in C? How is it declared and initialized?
BeginnerAnswers and explanations are in the Veda app.
Q2. How do you access elements of a 2D array in C? Provide the syntax.
BeginnerAnswers and explanations are in the Veda app.
Q3. What is the purpose of the `goto` statement in C? Give a simple example.
BeginnerAnswers and explanations are in the Veda app.
Q4. How do you declare a pointer in C? How do you initialize and dereference it?
BeginnerAnswers and explanations are in the Veda app.
Building up · 11 questions
Q5. What is a Variable Length Array (VLA) in C? Give an example.
IntermediateAnswers and explanations are in the Veda app.
Q6. What is the NULL statement in C? When is it used?
IntermediateAnswers and explanations are in the Veda app.
Q7. Explain the comma operator in C with an example.
IntermediateAnswers and explanations are in the Veda app.
Q8. What is a NULL pointer? What happens if you dereference it?
IntermediateAnswers and explanations are in the Veda app.
Q9. What is a void pointer? How is it used?
IntermediateAnswers and explanations are in the Veda app.
Q10. What is a wild pointer? How can it be avoided?
IntermediateAnswers and explanations are in the Veda app.
Q11. What is a dangling pointer? Give an example of how it occurs.
IntermediateAnswers and explanations are in the Veda app.
Q12. What is a double pointer (pointer to pointer)? How is it declared?
IntermediateAnswers and explanations are in the Veda app.
Q13. What is a pointer to a function? How is it different from a function pointer?
IntermediateAnswers and explanations are in the Veda app.
Q14. Explain the concept of 1D and multi-dimensional arrays in C. How are they stored in memory? Write a C program to add two 2x2 matrices using 2D arrays.
IntermediateAnswers and explanations are in the Veda app.
Q15. Discuss the different special types of pointers in C: NULL pointer, void pointer, wild pointer, and dangling pointer. Explain with examples how each is created and how to avoid issues.
IntermediateAnswers and explanations are in the Veda app.
Topper level · 7 questions
Q16. What is a Flexible Array Member in a structure? How is it declared?
AdvancedAnswers and explanations are in the Veda app.
Q17. What are `setjmp` and `longjmp` functions used for in C?
AdvancedAnswers and explanations are in the Veda app.
Q18. What is a function pointer? How do you declare and use it?
AdvancedAnswers and explanations are in the Veda app.
Q19. What are multilevel pointers? Provide an example.
AdvancedAnswers and explanations are in the Veda app.
Q20. Explain the concept of double pointers and multilevel pointers in C. Write a program that uses a double pointer to modify the value of an integer variable.
AdvancedAnswers and explanations are in the Veda app.
Q21. What are function pointers and pointers to functions? How are they declared, initialized, and used? Provide a program that uses a function pointer to call different arithmetic operations.
AdvancedAnswers and explanations are in the Veda app.
Q22. Describe the advanced control flow mechanisms in C: `goto`, NULL statement, comma operator, and `setjmp`/`longjmp`. Explain their use cases and provide a small example for each.
AdvancedAnswers and explanations are in the Veda app.
Your notes can be a kit like these
Every kit here was made from real study material. Point Veda at a chapter, a PDF, a photo or a link and get notes, flashcards, practice MCQs, games and a scored test — free to start, in more than 40 languages.
- Chapter notes
- Flashcards
- Practice MCQs
- Scored tests
- Paper Solver
Get Veda free See what students get
Free to start · Android app and web · More than 40 languages