EXAM & PRACTICE

C Programming Viva Questions and Answers

Quick C programming viva revision covering core syntax, control structures, arrays, functions, pointers, structures and file handling.

  1. What is C programming?

    C is a general-purpose procedural programming language.

  2. What is the purpose of main() in a C program?

    It is the function where program execution begins in a hosted C program.

  3. What is a variable?

    A named object used to store a value that can change during program execution.

  4. What is a data type?

    A type that describes the kind of value an object can hold and helps determine its representation and operations.

  5. What is the difference between = and ==?

    = is assignment; == tests equality.

  6. What is the purpose of a loop?

    Review the relevant topic page, then explain the concept in your own words and give a small example.

  7. What is an array?

    Review the relevant topic page, then explain the concept in your own words and give a small example.

  8. What is a string in C?

    Review the relevant topic page, then explain the concept in your own words and give a small example.

  9. What is a function?

    Review the relevant topic page, then explain the concept in your own words and give a small example.

  10. What is a pointer?

    A pointer is an object that stores an address or can be used to refer to an object indirectly.

  11. What do & and * mean in pointer expressions?

    Review the relevant topic page, then explain the concept in your own words and give a small example.

  12. What is a structure?

    Review the relevant topic page, then explain the concept in your own words and give a small example.

  13. What is a file pointer?

    Review the relevant topic page, then explain the concept in your own words and give a small example.

  14. Why should a file be closed after use?

    Review the relevant topic page, then explain the concept in your own words and give a small example.