Questions: 1 978

Answers by our Experts: 1 850

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Given an array arr[] sorted in ascending order of size N and an integer K.


Check if K is present in the array or not. (Use Binary Search)


Input: N = 5


K = 6


arr[] = {1,2,3,4,6}


Output: 1


Explanation: Since, 6 is present in the array at index 4 (0-based indexing),


output is 1

Write a C program to implement Queue operations such as enqueue, dequeue



and display using linked list.

Write a program that reads the numbers and sorts them by using the Counting Sort algorithm and finally search a number from that array using Linear Search Algorithm.

Input: 3 6 5 4 7 8 9

 Search Item: 7

Output: Sorted Array: 3 4 5 6 7 8 9

 Search item 7 is found.


Write a program that reads the numbers and sorts them by using the Counting Sort algorithm and finally search a number from that array using Linear Search Algorithm.



Input: 3 6 5 4 7 8 9



Search Item: 7



Output: Sorted Array: 3 4 5 6 7 8 9



Search item 7 is found.

Write a C program to implement Queue operations such as enqueue, dequeue and display using linked list. 


The system will run three modes in the following order cyclically: Spirit Level, Thermometer, Countdown Timer, Spirit Level, Thermometer, Countdown Timer, Spirit Level, Thermometer, Countdown Timer, etc.


The Thermometer section will run a loop. For each iteration, the raw temperature value is obtained and converted to Celsius and Fahrenheit values. The Celsius value is displayed on the LCD screen for two seconds. During these two seconds S2 is checked twice (i.e. once per second); if S2 is pressed the loop will terminate. Similarly, the Fahrenheit value is displayed on the LCD screen for two seconds. During these two seconds S2 is also checked twice (i.e. once per second); if S2 is pressed, the loop will terminate.


Spirit Level, Thermometer, Countdown Timer:

skeleton functions will be provided to you to complete the code within them. 3.1 Spirit level Firstly, you will need to write a function: int average(int *array, int nLen);


which returns the average value of an array of integer values. (To prevent overflow, it is suggested to use a long internal variable).


The Spirit Level function will run a loop. For each iteration, the Z-component of gravitational acceleration will be sampled four times at 50ms intervals and stored in a suitably sized array.


Using the average()function you have written, determine the average value of the 4 Zvalue samples and analyze it. The green LED should be illuminated if the board is flat. The yellow LED should be illuminated if the board is at a slight angle. The red LED should be illuminated if the board is at a steep angle. The loop can be exited by pressing and holding S2. 


write a program

1. Prompts the user to enter a number in the range of 1 to 60 from the keypad.

2. Waits for a user to enter a number in a range.

3. Counts from 0 to the entered number in 1-second increments, displaying the result on the 16x2 LCD display.

4. Once the count is complete, sound the buzzer.

5. Repeat the sequence from step 1


write a program

1. Prompts the user to enter a number in the range of 1 to 255 from the keypad.

2. Waits for a user to enter a number in a range.

3. Counts from 0 to the entered number in 300 ms increments, displaying the result on the binary LED display.

4. Once the count is complete, sound the buzzer.

5. Repeat the sequence from step 1.


8.3) write a program for the development board that repeatedly counts:

• from 0 to 9 in 1-second increments,

then • from 9 to 0 in 1-second increments.

The count should be displayed on the 7-segment display.


LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS