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?

Beginner

Answers and explanations are in the Veda app.

Q2. How do you access elements of a 2D array in C? Provide the syntax.

Beginner

Answers and explanations are in the Veda app.

Q3. What is the purpose of the `goto` statement in C? Give a simple example.

Beginner

Answers and explanations are in the Veda app.

Q4. How do you declare a pointer in C? How do you initialize and dereference it?

Beginner

Answers and explanations are in the Veda app.

Building up · 11 questions

Q5. What is a Variable Length Array (VLA) in C? Give an example.

Intermediate

Answers and explanations are in the Veda app.

Q6. What is the NULL statement in C? When is it used?

Intermediate

Answers and explanations are in the Veda app.

Q7. Explain the comma operator in C with an example.

Intermediate

Answers and explanations are in the Veda app.

Q8. What is a NULL pointer? What happens if you dereference it?

Intermediate

Answers and explanations are in the Veda app.

Q9. What is a void pointer? How is it used?

Intermediate

Answers and explanations are in the Veda app.

Q10. What is a wild pointer? How can it be avoided?

Intermediate

Answers and explanations are in the Veda app.

Q11. What is a dangling pointer? Give an example of how it occurs.

Intermediate

Answers and explanations are in the Veda app.

Q12. What is a double pointer (pointer to pointer)? How is it declared?

Intermediate

Answers and explanations are in the Veda app.

Q13. What is a pointer to a function? How is it different from a function pointer?

Intermediate

Answers 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.

Intermediate

Answers 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.

Intermediate

Answers 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?

Advanced

Answers and explanations are in the Veda app.

Q17. What are `setjmp` and `longjmp` functions used for in C?

Advanced

Answers and explanations are in the Veda app.

Q18. What is a function pointer? How do you declare and use it?

Advanced

Answers and explanations are in the Veda app.

Q19. What are multilevel pointers? Provide an example.

Advanced

Answers 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.

Advanced

Answers 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.

Advanced

Answers 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.

Advanced

Answers and explanations are in the Veda app.

Make your own

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