Questions: 9 913

Answers by our Experts: 9 913

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

write the code for round robin scheduling algorithm?


What are the various types of constructors used in object oriented programming? Explain with an example.

Explain the difference between class to basic type conversion and basic to class type conversion

Use basic to class type conversion to covert a long integer value to class datatype



Enter a 4 digit number and display the value at thousands position,hundreds position, tens position and ones position.

Write a program to create a class students having name, id, age. Create a file student.txt and open in append mode. Write the detail of 3 students into a file and read the data from the file and display on screen. Also copy content of this file into another file

1 an array containing 5 integer elements is already provided for you in the code editor below



2 print out the cube of the 1st, 3rd and 5th element of the given array

Write a C++ program to calculate area and perimeter of square and rectangle using function.

Output Example should be

Enter Side of a square: 4

Enter Length and Breadth of Rectangle: 3 6


The Area of a square is: 16

The Area of Rectangle is: 18

The Perimeter of a Square is: 16

The Perimeter of a rectangle is 18


  1. Input five decimal numbers in one line.
  2. Print out the decimal numbers in one line, separated by spaces, and make sure you only print up to 1 decimal place.
  3. Add the first four decimal numbers and check if their sum is greater than the fifth decimal number. Print out "Yes" if they are.

// Lab: Binary Search (find errors)

// Written by:

#include <iostream>

#include <cstdlib>


using namespace std;


int binarySearch(const int array[], int numElems, int value);


int main() {

  int list[100] = {5, 5, 8, 8, 8, 8, 9, 8, 9, 9, 10};

  int length = 11;

   

  for (int i = 0; i < length; i++) {

    cout << list[i] << " ";

  }

  cout << endl;

   

  for (int i = 0; i < 2 * length; i++) { // SEARCH 2 * length times

   

    int target = rand() % 5 + 5; // generate a random target within the range 5 to 10

    int location = binarySearch(list, length, target);


    if (location = - 1)

      cout << target << " NOT found!" << endl;

    else

    {

      // print a range: from index A to Z, inclusive!

      int z = location + 1;

      while( z < length && list[z] == list[location] )

        z++;

      z--;

       

      

   


: Write a program to take input for n book records from user and write those book records in a file named: ”record”, whose price is less than INR 500 . Program should also perform random access in the file, after taking input for a particular record number to read and it should also perform random record overwriting after taking input of new record and the record number to overwrite. After overwriting record, display all records on the screen [Attributes of book: Book_id, Book_price, Book_name, Book_author_name]


LATEST TUTORIALS
APPROVED BY CLIENTS