Cloud & DevOps questions and answers

Service models, containers, CI/CD and Linux. Practise cloud & devops questions from the technical & programming section of placement tests, with a worked explanation after every answer. Practice is free and needs no sign-up.

Sample cloud & devops questions with worked answers

Question 1

In which cloud service model does the consumer get virtual machines, storage and networks, but install and manage the operating system and applications themselves?

  1. SaaS
  2. PaaS
  3. IaaS
  4. FaaS

Answer: C. IaaS

Explanation: Infrastructure as a Service provides raw compute, storage and networking, and the customer manages everything from the OS upward. PaaS also manages the OS and runtime for you.

Question 2

After running chmod 754 report.sh, what are the permissions of report.sh?

  1. rwxr--r-x
  2. rwxr-xr--
  3. rwxrw-r--
  4. rw-r-xr--

Answer: B. rwxr-xr--

Explanation: Each digit is read (4) + write (2) + execute (1). 7 = rwx for the owner, 5 = r-x for the group and 4 = r-- for others, which gives rwxr-xr--.

Question 3

In a Dockerfile for a Node.js app, why are package.json and package-lock.json usually copied, and dependencies installed, BEFORE the rest of the source code is copied?

  1. Docker requires dependency files to be copied first
  2. It makes the final image run faster at runtime
  3. It prevents the source code from being included in the image
  4. The dependency-install layer stays cached and is reused when only the source code changes, which speeds up rebuilds

Answer: D. The dependency-install layer stays cached and is reused when only the source code changes, which speeds up rebuilds

Explanation: Docker caches each instruction's layer and rebuilds from the first changed layer onward. If the dependency manifests are unchanged, the slow install step is reused from cache.

All 30 cloud & devops questions with answers

Cloud & DevOps: common questions

What are cloud & devops questions?

Service models, containers, CI/CD and Linux. They appear in the technical & programming section of many placement tests.

Where can I practise cloud & devops questions with answers for free?

Right here on LogicWiz Exams. Every cloud & devops question has a worked explanation after you answer. Practice is free and needs no sign-up.

How should I practise cloud & devops?

Start with easy questions, then move to medium and hard. Read the explanation after each answer, and come back to the ones you missed.

Start practising

On this page you can start a fresh set of cloud & devops questions, choose easy, medium or hard, and time yourself if you want to. Or practise the whole subject: Technical & Programming practice.

More technical & programming topics

Other subjects

LogicWiz Exams home · All practice topics · Placement mock tests · Daily 10 challenge · Test from a job description · LogicWiz Open: free team quiz · Free interview prep