What should the header files not contain?
Blog
What does sscanf() do?
What does sscanf() do?
We want to write a function to calculate the sum of all elem…
We want to write a function to calculate the sum of all elements in an array. The function should take the array as a parameter and return the sum. Which of the following should the function prototype in C?
If you have a struct to hold information a 2D coordinate, wh…
If you have a struct to hold information a 2D coordinate, which of the following declarations are correct?
Why would you use an indefinite loop, as opposed to a defini…
Why would you use an indefinite loop, as opposed to a definite loop, to read in all the contents from a file?
What is the correct code for a macro to take in two paramete…
What is the correct code for a macro to take in two parameters and evaluate to the lesser of the two values passed in?
Given this macro: #define doSomething( x, y ) ( 2 * x – y )…
Given this macro: #define doSomething( x, y ) ( 2 * x – y ) What is the value of result after this code? int result = doSomething( 3, 2 );
If you attempt to fopen() a file for writing, but the file d…
If you attempt to fopen() a file for writing, but the file does not exist, what happens?
What does the following fgets() expression do assuming fileI…
What does the following fgets() expression do assuming fileIn points to an existing file for input? char buffer[ 1024 ]; fgets( buffer, 1024, fileIn );
Which of the following is a valid function call (assuming th…
Which of the following is a valid function call (assuming the function ‘test’ exists)?