Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

1.

Generate a digital clock using C program


2. Write a program in C for Full Adder
3. Write a C program for Karnaugh Map to minimize a Three Variables Boolean
function (Full subtractor)
4. State Machine Design in C
a. Let's say we are designing motor-control software. We want to start and
stop the motor, as well as change the motor's speed.

Figure 1: Motor state diagram

5. Write a program for ATM state machine in C


Consider an ATM machine and creating its sample state machine in C. The state of
the ATM machine could be changed through the coming events. 
The Sample States of the ATM machine.
 Idle State
 Card Inserted State
 Pin entered State
 Option Selected State
 Amount Entered State
Initially, the ATM machine would be in the Idle state. When a user inserts the card
then it changes state and processes the card. After the card processing, ATM again
changes state and asks the user to enter the PIN. When the user enteres the PIN
then it asks for choice (Balance inquiry, withdrawal, Deposit) and after that
changes the state and asks to enter the amount and dispatches the entered amount.

Figure 2: ATM state diagram

You might also like