Podcast
Questions and Answers
Which storage class in C is used to store variables with a global scope?
Which storage class in C is used to store variables with a global scope?
- Static
- Extern (correct)
- Auto
- Register
What is the primary difference between pass by value and pass by reference in C?
What is the primary difference between pass by value and pass by reference in C?
- Pass by value and pass by reference are essentially the same.
- Pass by value passes the address to the calling function, while pass by reference passes the value.
- Pass by value passes the value to the calling function, while pass by reference passes the address to the calling function. (correct)
- Pass by value and pass by reference cannot be used interchangeably.
What is the purpose of a void pointer in C?
What is the purpose of a void pointer in C?
- To point to NULL
- To store the address of a value located in memory
- To point to a specific memory location (correct)
- To create generic pointers
How is an array different from a pointer in C?
How is an array different from a pointer in C?
What is the main difference between a null pointer and a void pointer in C?
What is the main difference between a null pointer and a void pointer in C?
Flashcards are hidden until you start studying