Software engineers write programs to design and develop computer software. Interviews are highly technical, so come ready to work through coding problems and math brainteasers. The specific questions you are asked will depend on what type of programming position you are looking for. Try researching a specific software discipline such as web development, application development, or system development.
How many gas stations are there in California?
There is no simple answer, you have to justify your answer. For example, the population of California might be 40 million. Of those, perhaps 25 million have cars. Cars need to fill up about once a week, so you need 25 million / 7 stations.
Although you are correct in it being about showing how you got your answer and not the actual answer (usually anywhere within an order of magnitude works), the rationale described above is horrible. It makes an assumption that a gas station services one car a day.