← Qualcomm questions

Print odd and even numbers using two threads

Filed under Qualcomm

Write a program using two threads to print numbers from 1 to N sequentially. One thread must print only odd numbers and the other must print only even numbers, using synchronization to maintain order.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Qualcomm questions

Collected from public candidate posts and coding forums. Updated Nov 2026.