I'm revising for an exam comming up in C Programming. Can anyone help by answering some typical questions which might come up in the examination. Any help would be appreciated.
Basic data types
- What are the different types of data?
- What are signed and non-signed data types?
- What is a float used for?
- Why have a double?
- If you have an integer, how can you copy this value into a float?
- What is the size of a double?
- What is the logic for finding out if a number is a multiple of 4?
- How can you use if statements to determine more than one feature?
- How long is a piece of string?
Strings and arrays
- What happens when you use scanf to enter a string with spaces present?
- What happens when you use getchar to enter a string with spaces present?
- How can you extract a string from another string?
- How can you create an array of floating point numbers?
Structures and unions
- How do you access the elements of a structure?
- How can you set values to a specific part of the data structure?
- Why use structures?
- Where would you use a union?
- How do you open a file for reading?
- How do you open a file for writing?
- How do you open a file where you can append to the end?
- How can you read data from a file?
- How do you write data to a file?