The first one is a bunch of coding question like print asteriks in a specificed shape and implement a sorting algoritm. This is just to make sure you can write code.
If they know that you can write code and there will be second round of interview. There will be questions about the technical skills you write on your resume. There will be algorithm questions, code review questions, and technical questions related to the language based on the description of the job.